[00:49:53] http://cprogramminglanguage.net/c-for-loop-statement.aspx [00:49:53] Lol [00:49:57] Look at the loop and the output [00:55:44] you a c programmer, reedy? [00:55:59] Nope [00:56:12] also, wow. totally wrong. [00:56:35] Someone posted it in a uni irc channel [00:56:41] there's a copy of K&R on my desk if you wanna learn. [00:56:45] wanting someone else to validate the crap they were seeing [00:56:56] Amusingly, that's the first result on google for c for loop [00:57:23] I can do c to some extent, syntax is fine, just knowing language methods etc and the specifics [00:57:42] right. [00:57:52] what did they teach in uni? [00:57:56] java? [00:58:07] when i was in school, they didn't teach c. only ADA. [00:58:31] the university computers were overwhelmingly vax/vms [00:58:38] My uni is c# based [00:58:39] there was only one unix machine on the network. [00:58:57] And very much up microsofts arse [00:59:02] VMS is pretty much all ADA, and they spent a fuckload for the ADA compiler license. [00:59:16] c# is . . . well. [00:59:18] i'm sorry [00:59:27] if it were c++ you might be able to use it someplace else. [00:59:36] I don't mind C# [00:59:53] i know they're big on java at stanford out here. [00:59:54] At least it's not VB .NET ;) [01:00:01] i bet it's c/c++ at berkeley. [01:00:11] It seems most uni's teach either c#/java as the beginner/main language [01:00:24] my experience: once you learn one OO and one procedural language, you can learn any of them in short order. [01:00:43] We were "taught" C++ in the 2nd year, but i've not done any modules since then using it [01:00:49] i would bet the choice has to do with how much money microsoft spits to them. [01:01:09] Indeed, it wouldn't suprise me [01:01:19] The department, and the uni is VERY microsoft orientated [01:01:28] i can't see why you would, non? unless you're writing metal-level code, c++ is difficult to work with. [01:01:43] err, metal-level as in "interfaces with the operating system" [01:01:56] if you need to interface lower, or are unix, i'd go with C. [01:02:08] *jorm imagines network drivers written in C#; shudders. [01:02:11] heh [01:02:33] i like java but it has many issues that piss me off. [01:02:45] opening a file and reading the contents is like, this seriously fucking arcane process. [01:02:47] SunOracle? [01:03:17] everyone i know writes a wrapper utility class for that because it's so weird. [01:04:03] it's like, ByteStream bs = new ByteInputStream( new ByteOutputStream( new FileOutputStream( new File( "foo.jpg" ) ) ) ) ); [01:04:18] or some similarly bullshit way of doing it. [01:05:01] Console.WriteLine(new StreamReader( "file.txt" ).ReadToEnd()); [01:05:02] Done ;) [01:05:05] in perl, it's cake: my $contents; { local undef $/; open(F, "filename.txt"); $contents = ; close(F); } [01:05:20] .... i hate you. [01:05:33] actually, i've done something similar to a guy once in an interview. [01:05:45] he gave me a programming test. [01:06:56] it was this: You have an ArrayList() of Integer objects. The list is in random order and has duplicates. I want you to return the same List to me, but with no duplicates, and sorted by number. Use as few lines as possible. [01:07:34] haha [01:07:38] Inbuilt methods ftw [01:07:40] http://en.wikipedia.org/wiki/LOLCODE#Example_2 ;D [01:08:02] Saying that, I did a 15% of a module coursework in about 5 lines of code. 100%. GG [01:08:13] *a coursework worth 15% of a module [01:08:17] so I did this (given that l was the ArrayList): Collections.sort( l = new ArrayList( new HashSet( l ) ) ); [01:08:21] so one line. [01:09:01] array_unique( array_sort( ) ) in php... [01:09:48] he was a bit perplexed. he'd forgotten some basic java things (that Integers use equals() on the intVal(), for instance, and that HashSets() will instantly kill dupes) [01:10:05] also, a list of Integers will naturally sort in number. [01:11:01] Amusing [01:12:54] to be fair, the way .equals() is handled in java is often counter-intuitive. [01:13:45] there's just a lot of objects being created and killed out DOA for my taste. but so it goes.