Is that the printer he throws out the window ???
I literally watched that over and over and couldn't stop laughing
edit: I couldn't quote the gif because I don't have enough posts but its the one A_Hard_Rain posted.
|
-
04-05-2011, 06:03 PM #331
-
04-05-2011, 07:16 PM #332
I think some people are confused here. There are different paths in programming. There is software development for business or clients which doesn't require you to know all those algorithms and then there are software engineers A.K.A architects that come up with the algorithms. There are different level of duties. You can be a programmer but are only require to write the logic or classes of the program. Then there is a programmer whos duty is to implement these classes.
****************************
* MISC IT expert *
* Ron Paul for president!! *
****************************
-
-
04-05-2011, 08:07 PM #333
There are different paths in Computer Science. You basically have:
Web development
Software development
Databases
These all kind of intertwine a bit, but also have their own things. Not everyone is going to do it all in the job world, like you mentioned.
If you're implying that the thread has railed off, then I believe that this is a general place where someone can ask for help and for those of us with similar interests to chat.Hide yo kids, hide yo wife.
-
04-05-2011, 08:40 PM #334
What are your thoughts on graduate school? I'm seriously considering applying to Texas A&M's graduate program to earn either a masters of engineering in computer engineering or a masters of computer science. Both are non-thesis routes.
I feel like my B.S. is just barely scratching the surface and would like to really dive into the deeper, more interesting topics and research. I have 20hrs left in my B.S. so maybe I'll be more fulfilled when I'm done, we'll see.
Aha, gotcha.
Sudocode-kinda:
nthFromEnd(E head,int n){
finalNode = head.next;
prodeNode = head.next;
int count = 0;
while(count < n){
probeNode = probeNode.next;
count++;
}
while(probeNode.next != null){
probeNode = probeNode.next;
finalNode = finalNode.next;
}
return finalNode;
}Last edited by EasTexan; 04-05-2011 at 08:56 PM.
-
04-05-2011, 09:04 PM #335
-
04-05-2011, 09:39 PM #336
- Join Date: Dec 2009
- Location: Toronto, Ontario, Canada
- Posts: 454
- Rep Power: 289
That may be true, but I personally do not know any top software companies that doesn't ask basic data structure/algorithm problems during interviews. Sure anyone can hack out code once they learn the syntax, but that's just scratching the surface without fully appreciating the science behind how things work. Plus knowing and implementing basic data structures will improve the speed of your program by many magnitudes.
If that's not your style, then by all means.
Logic is correct, except for the index-off by one dreaded mistake we all make.
Dost thou dare tackle the binary tree problem?Misc Engineering & Photography Crew
-
-
04-05-2011, 09:45 PM #337
Aha, several silly mistakes. I wrote that out in less than 2mins and only drew out one case... didn't even consider n=1. At least the logic is almost correct. prodeNode should be probeNode... typo.
I will tackle the binary tree tomorrow after class. I took a break from studying Taylor and Maclaurin series crap in calc II to post my try at the linked-list problem. And just now to reply, haha. Back to studying. (I'm scared of that binary tree question tbh... :P)
-
04-06-2011, 09:03 PM #338
at my interview with *** they did not ask me to write any algorithms. The only thing close to an algorithm they asked me to do is a loop where it sets all elements in an array with values and displays it. I work at Bloomberg towers (one of the biggest financial firm) and they never asked me to write any algorithm. I just think people are confused on the different types of programming.
****************************
* MISC IT expert *
* Ron Paul for president!! *
****************************
-
04-06-2011, 09:30 PM #339
- Join Date: Dec 2009
- Location: Toronto, Ontario, Canada
- Posts: 454
- Rep Power: 289
Well sh!t, I guess all these people got punk'd by Bloomberg then!
http://www.glassdoor.com/Interview/B...O14,42_IP2.htm
I think you're the only one confused here.Misc Engineering & Photography Crew
-
04-06-2011, 09:34 PM #340
-
-
04-07-2011, 07:39 PM #341
i got an assignment to write for my C class tomorrow dealing with Arrays and i struggle with arrays so C programmers ill fukn rep you for life if you help me out when I need help srs.
Ill be able to get most of it just some help here and there█▀▄ █▀▀ ▄▀▀ ▀░░▄▀▀░ █░█ ▀▄░▄▀░░▄▀ █▀▀▄ █▀▀ █░░░█
█░█ █▀▀ ░▀▄ █░░█░▀▌ █░█ ░░█░░░░█░ █▐█▀ █▀▀ █░█░█
▀▀░ ▀▀▀ ▀▀░ ▀░░▀▀▀░ ░▀░ ░░▀░░░░░▀ ▀░▀▀ ▀▀▀ ░▀░▀░
-
04-08-2011, 10:09 PM #342
- Join Date: Apr 2010
- Location: Oregon, United States
- Age: 42
- Posts: 8,196
- Rep Power: 3178
Saw this and had to post it in this thread.
The internet is amazing lololol...
Join KIVA - Donate to those in need around the world! Free $25 for signing up!
http://www.kiva.org/invitedby/fuzzewuzze
Join the League of Legends! Largest MOBA Game of all time!
http://signup.leagueoflegends.com/?ref=4abffc9d33310
-
04-18-2011, 03:00 PM #343
-
04-18-2011, 03:03 PM #344
http://usesthis.com/archives/ cool website to read about what other devs use, etc.
Hide yo kids, hide yo wife.
-
-
04-19-2011, 06:21 PM #345
- Join Date: Nov 2002
- Location: Los Angeles, California, United States
- Age: 36
- Posts: 1,624
- Rep Power: 2739
So I'm working through "How to Think Like a Computer Scientist: Learning with Python" and I'm having trouble with a very basic script lol. I want to prompt the user to set the background color, turtle color and pen width, but I keep getting an error when i try to run the script about the color string not being defined. The Turtle library is supposed to have definitions for these colors, but maybe I'm missing a step. Here's my code:
Code:import turtle color_bg = str(input("What color do you want the background to be? ")) color_tess = str(input("What color do you want Tess to be? ")) width_tesspen = int(input("How wide should Tess' pen be? ")) wn = turtle.Screen() wn.bgcolor(color_bg) # set the window background color wn.title("Hello, Tess!") # set the window title tess = turtle.Turtle() tess.color(color_tess) # make tess blue tess.pensize(width_tesspen) # set the width of her pen tess.forward(50) tess.left(120) tess.forward(50) wn.exitonclick()
-
04-19-2011, 09:19 PM #346
-
04-19-2011, 10:44 PM #347
function build hashmap(head, n){
hashmap m = new HashMap()
for(int i = 0; i < head.length; i++){
m[i] = head.val
}
return m;
}
print m[n]
here's another optimization. If the algorithm needs to lookup the N'th node from the same tree, this will make lookups fast. The trade off here is memory. Memory is cheap tho and time isn't.
There are a lot of interview questions that require a hashmap. I've been interviewed by pretty much every big web tech company and a lot of the questions involve making a typical N^2 algorithm into a O(N) algorithm.
for example:
given an array of numbers and a number, find all the numbers in the array that add up to the given number
-
04-19-2011, 11:21 PM #348
- Join Date: Dec 2009
- Location: Toronto, Ontario, Canada
- Posts: 454
- Rep Power: 289
1. We're looking for the n-th LAST node. If we're looking at the n-th node, then the problem is trivial.
2. Hashmap?! I think you're really just implementing an array in your code. No need for the hash function overhead and extra space. Also, you can't index a Hashmap like an array unless you use a Sorted Hashmap/Dictionary, which implements AVL trees underneath the hood, and actually has a different run time compared to a normal Hashmap (albeit not too too significant for a reasonable input size). Only useful if repeated queries are required of the n-th last node, otherwise, this can be solved in-place, which has been posted already.
3. In your implementation head.val never gets changed. Why would you even need the value? The question is asking a reference to the node itself.
There are a lot of interview questions that require a hashmap. I've been interviewed by pretty much every big web tech company and a lot of the questions involve making a typical N^2 algorithm into a O(N) algorithm.
for example:
given an array of numbers and a number, find all the numbers in the array that add up to the given numberCode:void OutputNumbers(int[] a, int sum) { Dictionary<int, int> d = new Dictionary<int, int>(); foreach(int num in a) { if (!d.ContainsKey(sum - num)) //avoid collision in mapping the keys in case of repeated values d[sum - num] = num; } foreach(int num in a) { if (d.ContainsKey(num)) Console.WriteLine("{0} {1}", num, d[num]); } }
Misc Engineering & Photography Crew
-
-
04-20-2011, 05:22 AM #349
-
04-20-2011, 07:11 AM #350
LOL you are right, I dunno why I didn't just use an array. Interesting note about the avl tree thing. it made me realize I'm not even sure how hashmaps implement their data structures under the hood.
anyways, here's another go before class:
Code:function(head, num){ int count = 0; while((head.length - num) > count){ head = head.next count++; } return head }
linkedlist = 12 nodes. 3 from the last node is node 9 (11, 10, 9.. this is how I'm reasoning Nth from the last)
so head.length = 12. so 12 - 3 = 9. Then I just traverse the linked list until I reach the 9th node which is 3 form the last. There's prob errors somewhere, but I'm off to school now. Will appreciate comments.
Also, in your implementation of my algo problem, you could have use just 1 loop. you can check for the existance of the number you need as you are building the index. I can explain when I get back tonight if you don't get what I mean.
-
04-20-2011, 03:18 PM #351
-
04-21-2011, 10:22 AM #352
- Join Date: Dec 2008
- Location: Arizona, United States
- Age: 34
- Posts: 1,621
- Rep Power: 2134
/* Convert logical page number to physical frame number.
@param id the threadID of the requesting thread
@param pageNumber the page number the thread wants to access
@return the frameNumber (physical address) of the pageNumber
(logical address)
*/
public synchronized int accessMemory(int id, int pageNumber)
{
for(int a = 0; a < 1; a++)
{
PageTable requestPageNumber = pageTableList.lookup(a);
requestPageNumber.lookupPageTable(a);
System.out.println(requestPageNumber);
}
return 8;
}
I'm stuck here. help please.
-
-
04-23-2011, 03:37 PM #353
alice looks like its for little kids.. never used it though so i wouldn't know.
python is amazing, used in a large number of areas, scripting web sites via django, scripting video games via blender, desktop applications with gtk/wxpython, video games via pygame. the range of uses for python is huge, the number of tutorials and help on forums is also huge.
java is much faster than python but the syntax is not as strait forward and harder to understand. python would be your best bet for a starter programming language.
until you get into complex geometry or long running heavy work load algorithms, your programming language honestly doesn't matter. the basic principles are all the same.the whole world makes me lol
-
04-24-2011, 02:51 PM #354
-
04-29-2011, 03:09 PM #355
-
04-29-2011, 05:34 PM #356
-
-
05-08-2011, 11:19 AM #357
Bump.
I've been playing around with python for the last few days instead of studying. It's a nice change from MIPS.
Been using Tkinter for GUI stuff so far, it's really easy to use but there's a ton of other libraries for UI's out there. Anybody got any first hand experience/opinions on other toolkits
for python?
Reps for good answers.Rep back 3k+
-
05-08-2011, 02:49 PM #358
- Join Date: May 2008
- Location: Kentucky, United States
- Age: 34
- Posts: 2,855
- Rep Power: 0
Hey guys, just wondering what good Java programming books are out there. I have an intro to java programming book, but it's a text book for my class i took and 'm looking for something a little less like a textbook. I'm also taking a C# course when summer semester starts, so if there are any good books for that let me know as well. thanks in advanced.
-
05-08-2011, 03:05 PM #359
-
05-08-2011, 03:09 PM #360
Similar Threads
-
Help Me Shred The Fat Off, Help Is Needed Please !!
By Jase_01 in forum Losing FatReplies: 0Last Post: 04-14-2010, 11:34 PM -
Elbow Tendinitis.. what the hell man!! Help Wanted
By TooSharp in forum Workout ProgramsReplies: 9Last Post: 11-02-2009, 01:46 PM -
Learning the POWER CLEAN: Help Wanted [Video Inside]
By Dracoy in forum Powerlifting/StrongmanReplies: 22Last Post: 05-24-2009, 04:48 AM -
About the german volume training...help wanted
By master_no_name in forum Workout ProgramsReplies: 4Last Post: 01-12-2003, 06:16 PM
Bookmarks