Thread: Programming
View Single Post
Old Today, 11:30   #18
tweetiepooh
Virgin Media Employee
 
tweetiepooh's Avatar
 
Join Date: Sep 2005
Location: Winchester
Services: Staff MyRates BB: VM 1Gb TV: VM XL Phone : VM XL
Posts: 3,343
tweetiepooh has a bronzed appealtweetiepooh has a bronzed appeal
tweetiepooh has a bronzed appealtweetiepooh has a bronzed appealtweetiepooh has a bronzed appealtweetiepooh has a bronzed appealtweetiepooh has a bronzed appealtweetiepooh has a bronzed appealtweetiepooh has a bronzed appealtweetiepooh has a bronzed appealtweetiepooh has a bronzed appealtweetiepooh has a bronzed appealtweetiepooh has a bronzed appealtweetiepooh has a bronzed appealtweetiepooh has a bronzed appealtweetiepooh has a bronzed appealtweetiepooh has a bronzed appealtweetiepooh has a bronzed appealtweetiepooh has a bronzed appealtweetiepooh has a bronzed appealtweetiepooh has a bronzed appeal
Re: Programming

I was about to say that your original code didn't look right. Depending on the language today I may use something like
A = (B%2) ? 1 : 2


If B MOD 2 is TRUE (not zero - odd) set to 1 else set to 2.


At uni I coded in Fortran 77 and Basic but taught myself B.


For work I mostly used Clipper (xBase compiler) for a long while. That was fun but left as Windows and graphical interfaces came in.


Now, if I code, it is in Perl or Bash. I am looking at Rust and have done some Java, JSP and JavaScript, but most of my work is parsing text so Perl is great. I love the ethos of there is more than one way to do it (TIMTOWTDI) and that it is untyped so I can shove a number into a variable and later a string into the same variable. (Yes I understand why typing is good but if you don't always know what the data it going to be it saves casting and mucking around like that.)


Back to uni and the first touching of the computer was coding sheets -> punched cards -> output -> correct card and resubmit. We were told of a "whizz" where you picked up two decks of cards, then put a "goto label" card in one deck and the "label" card in the other and submit the pair together. The computer saw the "goto label" then kept going to find the label, past the "end" card on the first deck and into the middle of the code in the second. Wasn't that fun. I think they fixed the compiler to catch that. What saved me was finding the console room and our logins would work there. But as undergrads on a computing extra course we only had very limited time per week. I managed to wangle a postgrad account (unlimited) for the rest of my time at uni by demonstrating I could code and needed time to parse data collected from by project.
__________________
I work for VMO2 but reply here in my own right. Any help or advice is made on a best-effort basis. No comments construe any obligation on VMO2 or its employees.

Last edited by tweetiepooh; Today at 11:34.
tweetiepooh is offline   Reply With Quote