If you can read this, either the style sheet didn't load or you have an older browser that doesn't support style sheets. Try clearing your browser cache and refreshing the page.

(Telegraph)   How to code, step one; learn to ^c^v   (telegraph.co.uk) divider line 175
    More: Advice, algebra, baking sodas, maths, digitizations, calculus  
•       •       •

6544 clicks; posted to Geek » on 09 Dec 2012 at 5:25 PM (1 year ago)   |  Favorite    |   share:  Share on Twitter share via Email Share on Facebook   more»



175 Comments   (+0 »)
   
View Voting Results: Smartest and Funniest

Archived thread
 
2012-12-09 01:04:31 PM
Emacs vs vi just won....
 
2012-12-09 01:07:29 PM
And guess in which class you'll be learning the logical thinking skills that allow you to handle all those if's and then's...
 
2012-12-09 01:33:57 PM
i.telegraph.co.uk

What being good at maths might look like.
 
2012-12-09 01:48:41 PM
I is good at maths and is good at programmings but there is no if and only if relation. I can be replaced by a single 16 year old Pashtun hacker with incredible Ctl-C Ctl-V skills.
 
2012-12-09 02:47:47 PM
The requirement for a good coder is the ability to understand requirements, think logically, think very carefully about efficiency, think about easy extensibility, and consider all possible errors and put it effective error handling that allows easy debugging of what is wrong if something fails. And be quick making your way through all that.

If you work on 3D engines or the like, you also need to be good at math. But there are huge sectors of coding where all you need is the math you learned by third grade.
 
2012-12-09 04:47:13 PM
www.starzlife.com

I'll see your "What being good at maths is really like", and raise you a PhD.
 
2012-12-09 04:50:54 PM
I would like to learn how to code.

What I haven't had since 1998 is a code environment. I don't know how to compile and then debug without a program to do so. I also drag and drop elements like in C#.
 
2012-12-09 05:20:53 PM
Go to thenewboston.com and watch videos.
 
2012-12-09 05:29:18 PM
Back in my day we learned to code by adding cheats to nibbles.bas. And we liked it.
 
2012-12-09 05:31:42 PM
learn to ^c^v

Only be sure always to call it please "research."
 
2012-12-09 05:32:34 PM
Most of my programming classes wee about math. I suppose it depends on whether your helping design nuclear weapons or just writing news aggregator link builder sites.
 
2012-12-09 05:33:19 PM

doglover: I would like to learn how to code.

What I haven't had since 1998 is a code environment. I don't know how to compile and then debug without a program to do so. I also drag and drop elements like in C#.


Look into the "Eclipse" IDE
 
2012-12-09 05:34:11 PM

edmo: Most of my programming classes wee about math. I suppose it depends on whether your helping design nuclear weapons or just writing news aggregator link builder sites.


Well, back in the day, all programming required memory management and THAT required maths.
 
2012-12-09 05:35:39 PM

vossiewulf: The requirement for a good coder is the ability to understand requirements, think logically, think very carefully about efficiency, think about easy extensibility, and consider all possible errors and put it effective error handling that allows easy debugging of what is wrong if something fails. And be quick making your way through all that.

If you work on 3D engines or the like, you also need to be good at math. But there are huge sectors of coding where all you need is the math you learned by third grade.


I'd like a word with the people behind the amazing skill Firefox has gobbling up entire cores because google mail pops a requester, or the wonderful logic behind the "can't scroll to my tabs on the right" feature.
 
2012-12-09 05:36:54 PM

doglover: What I haven't had since 1998 is a code environment.


netbeans.org

As a self-taught coder, I stole code. Not so much to steal it steal it but, more to figure out what coders thought and did and how they arrived at their conclusions. Bottom line, I was the smartest coder who ever lived.

Until I went to university and starting taking higher-level math classes. That's where I learned that easiest sort is also the worst sort. And, this twisted, nobody-would-have-ever-thought-of-that sort was the best sort... unless the list was already sorted, in which case, it's right up there with the worst sort.

And, there's all this big O stuff that goes along with it and then there was the proof-writing class. I could never *read* proofs before. Now, I have to write them? And, holy crap, you mean that there's actually something *to* all these proofs and why things go fast and why things go slow and why crypto algorithms are provable weak unless they're provably hard and how some 14 year old has a clever way to bypass your provably hard crypto algorithm....

and, that's when I discovered that I wasn't the smartest coder who ever lived.

But, I'm still pretty damned good and thank goodness for all those math classes or I'd still be writing bubble sorts.
 
2012-12-09 05:39:27 PM

JustSurfin: [www.starzlife.com image 480x600]

I'll see your "What being good at maths is really like", and raise you a PhD.


There is something being raised, anyway.
 
2012-12-09 05:41:02 PM
I like your URL subby, math is clearly a strong point

/+1 to you
//and our equation
///although it's a liter +1 so it's not even real
 
2012-12-09 05:41:39 PM

neuroflare: I like your URL subby, math is clearly a strong point

/+1 to you
//and your equation
///although it's a liter +1 so it's not even real


FTFM...
 
2012-12-09 05:46:19 PM
There are those that can code and then those that can actually code. Work in the IT industry long enough and you can easily spot the difference. Some people have the talent, some just cut and paste and enjoy calling themselves coders more than they actually can code.

I used to work for an IT form that did about 60% of their turnover writing apps for clients. Some people were friggen terrible coders and everytime they carried on about how genius they were at coding it was always laughable.
 
2012-12-09 05:46:38 PM

neuroflare: neuroflare: I like your URL subby, math is clearly a strong point

/+1 to you
//and your equation
///although it's a liter +1 so it's not even real

FTFM...


As the article shows, you could leave it as "our equation", just use CTRL C and V.
 
2012-12-09 05:46:54 PM

neuroflare: /+1 to you


You could have just you++ you know.
 
2012-12-09 05:54:07 PM

Roman Fyseek: neuroflare: /+1 to you

You could have just you++ you know.


Good call
 
2012-12-09 05:56:09 PM
If you're writing a database LOB CRUD application? No. Any reasonably intelligent person could accomplish it with today's tools.

If you want to really "code", you need to at least understand the basics of Algebra.

If you're writing 3D games, you are going to need to need to understand trigonometry.

If you're writing financial software, you are going to need to know a few things about statistics.

If you're writing a spam filter, a good understanding of Bayesian probability would be a big help.

Programmer translate ideas into code. If we don't understand the source material, we cannot properly translate it.
 
2012-12-09 05:56:15 PM
Roman Fyseek
And, there's all this big O stuff that goes along with it and then there was the proof-writing class. I could never *read* proofs before. Now, I have to write them? And, holy crap, you mean that there's actually something *to* all these proofs and why things go fast and why things go slow and why crypto algorithms are provable weak unless they're provably hard and how some 14 year old has a clever way to bypass your provably hard crypto algorithm....


I remember learning about the big O. It was a real pleasure when it came to me.
 
2012-12-09 06:00:28 PM
Been in software development for over 20 years.

There's a lot of copying stuff from elsewhere now, and you'd be daft as a developer to build your own AJAX-based grid rather than using jQuery and jqGrid.

BUT do you know the difference between local and server-side filtering? How long that request is going to take if you fetch all results in one go vs doing filtering and paging on the server side? What indexing you need to put on the table? How to write and secure the server side JSON request? How to validate the request? Do you know how to tell which plugins are worth using?

The worst way to teach people is with "here's a chunk of code, paste it in". The right way is to teach people to code using a blank sheet of paper where they learn all the fundamental stuff like loops, decisions, classes, SQL. Then move on to HTML and Javascript. And once you've done that, then you start telling them about all the shortcuts to doing the stuff you've taught them.
 
2012-12-09 06:10:36 PM
How To Code. Step One: FARK THAT SHIAT, TRY HEROIN. IT'S LESS MENTALLY DESTRUCTIVE.

/As God as my witness, I will never be able to remember a good chunk of the hexadecimal editing, manual decryption or digital-equivalent-of-duct-tape-and-staples I had to use to make that farking stupid SSF ROM-header reader (Saturn emulator) figure out how to GODDAMN LOAD BEYOND 16k.

/Required for a LOT of the arcade and 1st-party titles released near the end of it's life. Drove me to drinking.
 
2012-12-09 06:10:37 PM
I run numerical weather prediction models (seriously), so I'm getting a kick out of these replies. That said, there's no way in hell I could program one of those myself. Actually, I take that back -- I could program one that was ridiculously inefficient and only ran in serial.

I don't care about object-oriented programming for what I do -- it's all just FORTRAN code that needs to solve equations SUPER SUPER SUPER FAST. I wish I knew/understood parallel computing/programming better.

/Gets to run on some of the fastest supercomputers in the world... eagerly awaiting this
 
2012-12-09 06:10:55 PM

edmo: Most of my programming classes wee about math. I suppose it depends on whether your helping design nuclear weapons or just writing news aggregator link builder sites.


My programming classes existed to support a Business Info Systems degree. There wasn't much math required other than addition and a little multiplication. I can crank out a quick and dirty application like a madman, though.
 
2012-12-09 06:15:10 PM
s-ak.buzzfed.com

What are you going to do with all that coding knowledge when the server physically fails?
shiat, what is the average person going to do with coding knowledge period.



///last shiat I programmed in was BASIC...not visualBASIC or QBASIC
 
2012-12-09 06:16:03 PM

hershy799: I run numerical weather prediction models (seriously), so I'm getting a kick out of these replies. That said, there's no way in hell I could program one of those myself. Actually, I take that back -- I could program one that was ridiculously inefficient and only ran in serial.

I don't care about object-oriented programming for what I do -- it's all just FORTRAN code that needs to solve equations SUPER SUPER SUPER FAST. I wish I knew/understood parallel computing/programming better.

/Gets to run on some of the fastest supercomputers in the world... eagerly awaiting this


How ya doin'?
 
2012-12-09 06:16:23 PM

hershy799: only ran in serial.


My office runs this massively parallel computing thingy. I was tearing my hair out over how the server knew when to feed more data to all the processes and when I finally asked the guy that wrote it, I felt stupid.

(hint: the server doesn't feed to the processes. The processes ask for more when they're finished with their current batch)

It's little shiat like that that will drive coders nuts and leads to wildly inefficient programming. Seriously, teaching yourself to code is easy. Learning to code right requires a qualified instructor.

Or, being Babbage or something.
 
2012-12-09 06:19:26 PM
No - copy/paste is not a programming method.

I've been saying this for farking years.

If you find yourself doing a lot of copying and pasting maybe you just call a function.
 
2012-12-09 06:25:31 PM

kevinatilusa: And guess in which class you'll be learning the logical thinking skills that allow you to handle all those if's and then's...


I learned mine in my logical and discrete "math" class. Then again, we also covered a good chunk of the material in my intro to philosophy class as well.
 
2012-12-09 06:27:54 PM

farkeruk: Been in software development for over 20 years.

There's a lot of copying stuff from elsewhere now, and you'd be daft as a developer to build your own AJAX-based grid rather than using jQuery and jqGrid.

BUT do you know the difference between local and server-side filtering? How long that request is going to take if you fetch all results in one go vs doing filtering and paging on the server side? What indexing you need to put on the table? How to write and secure the server side JSON request? How to validate the request? Do you know how to tell which plugins are worth using?

The worst way to teach people is with "here's a chunk of code, paste it in". The right way is to teach people to code using a blank sheet of paper where they learn all the fundamental stuff like loops, decisions, classes, SQL. Then move on to HTML and Javascript. And once you've done that, then you start telling them about all the shortcuts to doing the stuff you've taught them.


Came here to say something like this. Taking other people's functions doesn't teach you a goddamned thing.
 
2012-12-09 06:30:51 PM

LazarusLong42: farkeruk: Been in software development for over 20 years.

There's a lot of copying stuff from elsewhere now, and you'd be daft as a developer to build your own AJAX-based grid rather than using jQuery and jqGrid.

BUT do you know the difference between local and server-side filtering? How long that request is going to take if you fetch all results in one go vs doing filtering and paging on the server side? What indexing you need to put on the table? How to write and secure the server side JSON request? How to validate the request? Do you know how to tell which plugins are worth using?

The worst way to teach people is with "here's a chunk of code, paste it in". The right way is to teach people to code using a blank sheet of paper where they learn all the fundamental stuff like loops, decisions, classes, SQL. Then move on to HTML and Javascript. And once you've done that, then you start telling them about all the shortcuts to doing the stuff you've taught them.

Came here to say something like this. Taking other people's functions doesn't teach you a goddamned thing.


It doesn't teach you much, if anything, but it sure as fark makes my job easier a lot of the time. Then again, scripting and developing are not the primary focus of my just just a large one.
 
2012-12-09 06:34:42 PM

Happy Hours: No - copy/paste is not a programming method.

I've been saying this for farking years.

If you find yourself doing a lot of copying and pasting maybe you just call a function.


If you write a block of code once, consider making it a function.
If you write a block of code twice, you must make it a function.
If you write a block of code three times, we should consider firing you.

I probably botched the quote a bit, but basically the same sentiment.
Copy/Paste is design patter. A terrible terrible design pattern that results in terrible, un-maintainable software.
 
2012-12-09 06:38:11 PM
Strictly speaking you may not use math very much in most programs, but the mental skills used for math are similar to the ones used for programming. If you're bad at math, you're almost certainly going to be bad at programming too. Don't despair though. There are plenty of bad programmers out there. Their lack of skill hasn't stopped them and it shouldn't stop you either.
 
2012-12-09 06:45:27 PM

farkeruk: Been in software development for over 20 years.

The right way is to teach people to code using a blank sheet of paper where they learn all the fundamental stuff like loops, decisions, classes, SQL. Then move on to HTML and Javascript. And once you've done that, then you start telling them about all the shortcuts to doing the stuff you've taught them.


That's how I learned it. When we were finally given java.util.linkedList, we all groaned but after the fact I realize that writing my own linked list package taught me how they work, and reinforced pointers. It's way more helpful.

I do sort of agree that math isn't needed for all software development jobs, but the better developers use math to make sure they are coding efficient algorithms (especially in embedded systems like I work on). But "code monkeys" do exist who make a fine living blindly writing up what a systems engineer provided as requirements. I, on the other hand, prefer a basic "shall" statement to pseudocode so I can do it right.
 
2012-12-09 06:52:05 PM

LazarusLong42:

Came here to say something like this. Taking other people's functions doesn't teach you a goddamned thing.



Well, not if you stop there. If you take someone else's code, then start reading and modifying it though...
 
2012-12-09 07:06:15 PM

Gig103: I do sort of agree that math isn't needed for all software development jobs, but the better developers use math to make sure they are coding efficient algorithms (especially in embedded systems like I work on). But "code monkeys" do exist who make a fine living blindly writing up what a systems engineer provided as requirements. I, on the other hand, prefer a basic "shall" statement to pseudocode so I can do it right.


It really depends what you're doing. I can see that for embedded, but if you're doing things like server-side web development, you've got the power that means that code efficiency just isn't worth worrying too much about. Database performance and network IO are far bigger fish to fry.
 
2012-12-09 07:07:45 PM
I was a self-taught programmer during high school, and wrote and sold (small) business software. I thought I was the hottest stuff ever. Then I started information science / computer science at university, and realized that I was total shyte before.

So if anybody tells me that being a good programmer doesn't require any format education or knowledge, I nod politely and ignore them afterwards.

Now I'm again thinking that I'm the hottest stuff ever. There's surely another epiphany coming.
 
2012-12-09 07:08:47 PM
"doesn't require any format education or knowledge"

formal, even
 
2012-12-09 07:09:36 PM
10 REM "Another green for me"
20 PRINT "Green"
30 for t=1 to 300
40 CLS
50 next t
60 goto 20
1000 END
 
2012-12-09 07:13:03 PM
Actual mathematics (meaning proofs, theory, etc. and not just arithmetic) is closer to programming than pretty much anything.
 
2012-12-09 07:18:57 PM

Uchiha_Cycliste: doglover: I would like to learn how to code.

What I haven't had since 1998 is a code environment. I don't know how to compile and then debug without a program to do so. I also drag and drop elements like in C#.

Look into the "Eclipse" IDE


Oh I likes Eclipses, precious
 
2012-12-09 07:22:44 PM

vossiewulf: The requirement for a good coder is the ability to understand requirements, think logically, think very carefully about efficiency, think about easy extensibility, and consider all possible errors and put it effective error handling that allows easy debugging of what is wrong if something fails. And be quick making your way through all that.

If you work on 3D engines or the like, you also need to be good at math. But there are huge sectors of coding where all you need is the math you learned by third grade.


As a person who writes those requirements, finding someone who understands them instead of going with something "cooler" is a major skill a lot of developers lack. You would be surprised how often I hear, "Why would anyone want to do that? I have a better idea." So, you sit down, explain the customers' business, and they say, "Oh. Are you sure?" By the way, it's not like the customer wants more complexity. Often, it's quite the opposite. We talking about engineers who want to deliver incredibly complex things with absolutely no GUI. So, cool, but unusable by anyone in marketing. By the way, I am in no way saying that every developer lacks the skill to understand requirements. But I am saying it's a rare enough skill you can make some good money if you do get it.
 
2012-12-09 07:25:08 PM
I ran into a new programmer at a conference. He's a Jave programmer. Java only. Period. I asked him how many languages he thought he would ever need and he said "Java and maybe Javascript". Then he asked me how many programming languages I've used (I've been in the biz since the late 70s). I was still listing languages 5 minutes later when his eyes glazed over and his brain rebooted.

That was fun. Java punk. You want my job, you got a lot of studying to do.
 
2012-12-09 07:25:13 PM
FTA: "So in most cases you can see that the hard maths (the physical and geometry) is either done by a computer or has been done by someone else. "

Wow, what great career advice. "Don't worry, someone else will do the hard part." Holy crap.
 
2012-12-09 07:26:32 PM

midigod: FTA: "So in most cases you can see that the hard maths (the physical and geometry) is either done by a computer or has been done by someone else. "

Wow, what great career advice. "Don't worry, someone else will do the hard part." Holy crap.


Although that quote IS an oversimplification, it's called "not re-inventing the wheel".
 
2012-12-09 07:45:57 PM

JustSurfin: That was fun. Java punk. You want my job, you got a lot of studying to do.


The stupid thing is, since Java is derived from the C programming language, it wouldn't be hard for him to learn other derivatives such as ANSI-C, C++, C♯, Scala or Perl. Biggest issue would be the jump from object-oriented programming to procedural programming in ANSI-C and Perl.

If you want an alien landscape, try going from C to LISP. Holy fark, that was different.
 
2012-12-09 07:46:28 PM

DeaH: As a person who writes those requirements


Look, a Product weenie! Nah, as you can see as a manager I understand the goal is to make what the product people say we need, they're the poor bastards talking to the customers and trying to figure out what all that competing nonsense means.

We will regularly point out things that we think could be done better, or that what they say they want would be a farking ginormous amount of work for the value of the output, but we always work something out. You want that dialog, it results in the best product. Just as bad as coders who go rogue and do something different on their own is coders who blindly do whatever the requirements say.
 
2012-12-09 07:51:00 PM

freidog: If you write a block of code once, consider making it a function.
If you write a block of code twice, you must make it a function.
If you write a block of code three times, we should consider firing you.


The last major project I had the pleasure of working on was coded in "stream of conscience" mode. Code was copy/pasted of hundreds of times throughout the project and then adapted to meet the needs of the particular context. Table cursors were global so every time you needed to hit the database, the cursor state needed to be saved, reused, and then restored to ensure the integrity of the working data set. It was the a farking nightmare. And this wasn't some LOB application, this was a Point of Sale system that dealt with credit cards.

Worst. Codebase. Ever.
 
2012-12-09 07:56:40 PM

nmemkha: freidog: If you write a block of code once, consider making it a function.
If you write a block of code twice, you must make it a function.
If you write a block of code three times, we should consider firing you.

The last major project I had the pleasure of working on was coded in "stream of conscience" mode. Code was copy/pasted of hundreds of times throughout the project and then adapted to meet the needs of the particular context. Table cursors were global so every time you needed to hit the database, the cursor state needed to be saved, reused, and then restored to ensure the integrity of the working data set. It was the a farking nightmare. And this wasn't some LOB application, this was a Point of Sale system that dealt with credit cards.

Worst. Codebase. Ever.


You should do a writeup on this and send it to DailyWTF.
 
2012-12-09 07:58:08 PM

Doc Ok: Then I started information science / computer science at university, and realized that I was total shyte before.


I'd argue that for people who were self-taught how to program, the first year of CS at university was all about re-learning how to write comments. All of my professors harped on the subject and devoted a significant part of your projects' score to commenting style, verbosity and quality.

I really didn't get into new topics until I hit the CS3xx level, which spent a lot of time discussing advanced data structures, data abstraction and low-level systems programming, and the CS4xx level, which spent a lot of time discussing architectural design, process management, crisis resolution and the like.
 
2012-12-09 07:59:33 PM

Dinjiin: JustSurfin: That was fun. Java punk. You want my job, you got a lot of studying to do.

The stupid thing is, since Java is derived from the C programming language, it wouldn't be hard for him to learn other derivatives such as ANSI-C, C++, C♯, Scala or Perl. Biggest issue would be the jump from object-oriented programming to procedural programming in ANSI-C and Perl.

If you want an alien landscape, try going from C to LISP. Holy fark, that was different.


I did Java to C/C++ when I went to college. That was a pain because Java is effectively a cleaned-up subset of C++. Now C# is basically Java, but C++ would be difficult.
 
2012-12-09 08:03:09 PM

farkeruk: There's a lot of copying stuff from elsewhere now


I [used to] use a lot of BSD and MIT licensed code in my own projects. The problem is, you often get what you pay for. My professors would have publicly flogged many of the programmers I've grabbed code from for their poor style and documentation. It'd take days to figure out what was in the head of some of those programmers.

I just got to the point where I'd read the original code for ideas and examples, and then just rewrite major parts.
 
2012-12-09 08:17:51 PM
Teaching yourself to code doesn't require much maths, says Emma Mulqueeny - just logic

And I'm done reading there.
 
2012-12-09 08:23:54 PM

mcmnky: Teaching yourself to code doesn't require much maths, says Emma Mulqueeny - just logic

And I'm done reading there.


I don't know. Algebra, sure. Trig at a "draw lines on a whiteboard and puzzle out sin() and cos() calls until it works" level, definitely. Beyond that, not really.

Now if the stuff you're coding requires serious math, that's different, and you'll need to know that math. But that's independent of the math you needed to code in the first place.
 
2012-12-09 08:32:45 PM

freidog: If you write a block of code once, consider making it a function.
If you write a block of code twice, you must make it a function.
If you write a block of code three times, we should consider firing you.

I probably botched the quote a bit, but basically the same sentiment.


You probably could have copy-pasted that quote from somewhere :)
 
2012-12-09 08:41:13 PM
1. Learn to figure out requirements from people. This includes knowing when not to give them exactly what they asked for, and knowing when to ask why they want this thing in the first place. Half of my job is telling people that they should use some product that is more mature than whatever I'm going to bake up.

2. Use an appropriate language for the task. Just because you learned Java in college doesn't mean you should be using it for every single project, including the ones that involve a single Linux server and a web application. (That's a better task for Perl, PHP, Ruby, or even HTML/jQuery.) If you don't need portability, STOP USING JAVA!

3. Don't rush the coding. Stress coding ends up with more bugs and more mistakes which take longer to fix than just coding normally.
 
2012-12-09 08:51:57 PM
In my computer science classes in school, there really was a world between people who just copied things and people who actually made things. In the end, both people had something that worked, but the copiers had no real idea HOW it worked, and couldn't fix any problems that may have arisen.

I guess it's a bit like people who cook TV dinners claiming to be able to cook. I guess it's technically true, but......

Basically, this is horrid advice, and everyone should just go buy a book.

//Want to learn anything? Go buy a book. Move to the internet once you learn how to discriminate between horseshiat and knowledge.
 
2012-12-09 08:59:38 PM
Math? Completely worthless for programming.

Now if you'll excuse me, I need to get back to copying this bubble sort algorithm for my new Google search replacement.
 
rpm
2012-12-09 09:04:57 PM

ModernLuddite: In my computer science classes in school, there really was a world between people who just copied things and people who actually made things. In the end, both people had something that worked, but the copiers had no real idea HOW it worked, and couldn't fix any problems that may have arisen.


This. And sometimes it's the TAs of the CS courses. I lost credit on exam because he didn't understand what I wrote. I got the credit back after I explained to him WTF synchronization was and why I was using it.
 
2012-12-09 09:06:37 PM

meyerkev: I don't know. Algebra, sure. Trig at a "draw lines on a whiteboard and puzzle out sin() and cos() calls until it works" level, definitely. Beyond that, not really.

Now if the stuff you're coding requires serious math, that's different, and you'll need to know that math. But that's independent of the math you needed to code in the first place.


vossiewulf: The requirement for a good coder is the ability to understand requirements, think logically, think very carefully about efficiency, think about easy extensibility, and consider all possible errors and put it effective error handling that allows easy debugging of what is wrong if something fails. And be quick making your way through all that.

If you work on 3D engines or the like, you also need to be good at math. But there are huge sectors of coding where all you need is the math you learned by third grade.


*facepalm*

Logic is Math. The assertion that you don't need math to program, only logic, is like saying you don't need fruit to make a pie, only apples.

How do you think about efficiency without math? How do you define or measure efficiency without math? How do consider all possible errors without math? How do you know if your error handling is effective without math?

You don't. You can't. I suppose you could brute force it--try every possible permutation of commands and settle on the one that runs quickest and returns and fewest number of errors. Of course, you'll also have to try it with all possible input data. And without math, you'll never comprehend what an enormous waste of time all that is.
 
2012-12-09 09:06:59 PM

meyerkev: mcmnky: Teaching yourself to code doesn't require much maths, says Emma Mulqueeny - just logic

And I'm done reading there.

I don't know. Algebra, sure. Trig at a "draw lines on a whiteboard and puzzle out sin() and cos() calls until it works" level, definitely. Beyond that, not really.


I think his point is that logic is math.
 
2012-12-09 09:07:52 PM
Note to self: refresh before posting.
 
2012-12-09 09:13:14 PM

SineSwiper: If you don't need portability, STOP USING JAVA!


Portability isn't a good reason to use Java. Not even in the top 10.
 
2012-12-09 09:16:01 PM
We call this "Three Button Programming".
 
2012-12-09 09:32:57 PM

rpm: ModernLuddite: In my computer science classes in school, there really was a world between people who just copied things and people who actually made things. In the end, both people had something that worked, but the copiers had no real idea HOW it worked, and couldn't fix any problems that may have arisen.

This. And sometimes it's the TAs of the CS courses. I lost credit on exam because he didn't understand what I wrote. I got the credit back after I explained to him WTF synchronization was and why I was using it.


My CS course in high school was interesting because the class was about 50% nerdy kids, and 50% straight-A overachievers who wanted the extra AP credits. The straight A kids all ended up failing. Because in CS you actually have to THINK. And unfortunately, you can't teach people to think. They just have to want to do it, and apply it.

Which is, as I said, why this is hideous advice.
 
2012-12-09 09:43:02 PM

ModernLuddite: My CS course in high school was interesting because the class was about 50% nerdy kids, and 50% straight-A overachievers who wanted the extra AP credits. The straight A kids all ended up failing. Because in CS you actually have to THINK. And unfortunately, you can't teach people to think. They just have to want to do it, and apply it.


Meet the double-hump bell curve
 
2012-12-09 09:43:47 PM

Professor Science: learn to ^c^v

Only be sure always to call it please "research."



You have a friend in Minsk?
 
2012-12-09 09:44:52 PM

mcmnky: *facepalm*

Logic is Math. Rantity rant rant...


I didn't say NO math, I said no math greater than third grade. Or maybe fifth grade. I know a zillion very logical thinkers who manage to do so without the use of differential equations, I guess you are unlucky. And you don't need trigonometry to profile code and based on experience, knowledge of what it's doing, and what it's supposed to do, know whether it's fast enough or as fast as it could be, and then drill down on the slow functions and improve them.

Dunno guy, I manage a large group working on code that generates revenue with numbers starting with a b, everyone is quite pleased with the quality and efficiency, and none of my guys needs to take a cosine of anything. The BI guys, that's a different story.

If you're working on code that's supposed to analyze complex data, involves physics, or any other number of math-intensive applications, yes you need good math guys. But as I said originally, there are large sectors of the coding world where that isn't the case.
 
2012-12-09 09:49:29 PM

vossiewulf: I didn't say NO math, I said no math greater than third grade.


You must have gone to a pretty awesome school where they taught formal logic and complexity analysis in third grade.
 
2012-12-09 09:53:28 PM

vossiewulf:
I didn't say NO math, I said no math greater than third grade. Or maybe fifth grade.


If you think the pertinent math here is diff eq and trig, it's really sounding like you have extremely limited experience. Those jobs are there, but honestly, they tend to result in bad code. Maybe you're that one in a million.
 
2012-12-09 10:02:39 PM
As a Computer Science grad who got stuck doing Business Analysis, I can tell you that being a business analyst sucks donkey balls. I really miss programming, so I have to get my kicks doing stuff like fiddling with the Android SDK when I get home from work.

Hopefully I transition back into development in the near future, preferably not in COBOL which is what I am doing business analysis for, once our services are re-developed into Java.

/seriously, writing test plans and validating data sucks when youre used to solving problems rather than just pointing them out
 
2012-12-09 10:16:24 PM

Swoop1809: Hopefully I transition back into development in the near future, preferably not in COBOL which is what I am doing business analysis for, once our services are re-developed into Java.


People keep telling me we don't use COBOL anymore, but I know that isn't true.
 
2012-12-09 10:18:56 PM

meyerkev: I did Java to C/C++ when I went to college. That was a pain because Java is effectively a cleaned-up subset of C++. Now C# is basically Java, but C++ would be difficult.


One of the nice things about Java and C♯/dotNet is that they both have very clean, consistent and expansive APIs. With C++, only a fraction of the functions you usually need are in the C/C++ Standard Libraries, so you end up having to bang against WinAPI/MFC/GDI+, GTK/GTK+ or Qt. Learning C/C++ is as much about the underlying OS as it is about the programming language itself.
 
2012-12-09 10:24:35 PM

Rockstone: Swoop1809: Hopefully I transition back into development in the near future, preferably not in COBOL which is what I am doing business analysis for, once our services are re-developed into Java.

People keep telling me we don't use COBOL anymore, but I know that isn't true.


COBOL is still everywhere large amounts of data need processing. Banks, UPS, Amazon all have mainframes that utilize COBOL. It isnt going away in the near future either. The company I work for is phasing it out because no one my age (23) learns it anymore, we learn object oriented languages, and the old guard developers are getting expensive. . Most COBOL developers we have are contractors or offshore.
 
2012-12-09 10:25:04 PM

Rockstone: Swoop1809: Hopefully I transition back into development in the near future, preferably not in COBOL which is what I am doing business analysis for, once our services are re-developed into Java.

People keep telling me we don't use COBOL anymore, but I know that isn't true.


From what I've been hearing, it's more like:

We don't actually write stuff in COBOL anymore. We write [insert newer language here] wrappers around the COBOL so that the working, largely debugged, functional code we spent a few decades and millions of programmer dollars writing isn't thrown away and works with our new awesome system, and there's usually 1 or 2 guys who actually know COBOL that can go in and fix stuff that breaks.

So we use it, we just don't write it, and it's probably a stupid language to learn unless you explicitly need it for your job.

/Keeping in mind that every company is different.
 
2012-12-09 10:25:52 PM

Swoop1809: As a Computer Science grad who got stuck doing Business Analysis, I can tell you that being a business analyst sucks donkey balls. I really miss programming, so I have to get my kicks doing stuff like fiddling with the Android SDK when I get home from work.

Hopefully I transition back into development in the near future, preferably not in COBOL which is what I am doing business analysis for, once our services are re-developed into Java.

/seriously, writing test plans and validating data sucks when youre used to solving problems rather than just pointing them out


I worked for a major telecom that uses COBOL for damn near everything. Every year they'd have consultants come in and say 'Switch to Java' or any other language and the telecom would say 'maybe next year'


...for the past 30 years
 
2012-12-09 10:40:01 PM

Swoop1809: Amazon all have mainframes that utilize COBOL


I would be surprised if this were true.

Banks use COBOL because they're still dependent on enterprise-critical programs written in the 1960s. It's certainly not that COBOL is good at handling that data -- in fact, it's absolute shiat at that kind of thing. Hell, COBOL is absolute shiat at everything. It's just that rewriting all that code into something else is insanely difficult from a business perspective. So they've been using the same code for more than 40 years, and they'll continue to lumber along with the same code for the next 40 years.

Amazon probably isn't saddled with 40 year old code.
 
2012-12-09 10:40:40 PM
My current title is "chief software engineer", I'm leading a small group of developers. 12 years of experiment in image processing and neural networks (artificial intelligence if you like), many developers passed under my umbrella and I have to say, the worst kind of them were those who were good at teh maths. Why? Because they were not creative. They were thinking in equations and not in code. When they implemented a solution for a problem they could not see the shortcomings, they lacked any critical thinking because they had the mathematical proof that they had done everything correctly. They lacked the ability to make one step further and make the solution any better than it was written in the research papers and studies.

Many of them had the habit to copy-paste some code from teh net, which was also a sign of the lack of critical thinking. It may be a good practice when you are implementing industry standards, but not when you need to deeply understand the code, and not when you are expected to make something that is better than what is out there.

Of course it is an advantage if you are good at the maths. But if it is all what you've got, you should not be coding. And forget ^c^v, it will only bring problems on the long term.
 
2012-12-09 10:44:48 PM

vossiewulf: DeaH: As a person who writes those requirements

Look, a Product weenie! Nah, as you can see as a manager I understand the goal is to make what the product people say we need, they're the poor bastards talking to the customers and trying to figure out what all that competing nonsense means.

We will regularly point out things that we think could be done better, or that what they say they want would be a farking ginormous amount of work for the value of the output, but we always work something out. You want that dialog, it results in the best product. Just as bad as coders who go rogue and do something different on their own is coders who blindly do whatever the requirements say.


I'm not against the dialogue. I am against disregarding function and use. If you can give the client something better than they ask, and that something meets their needs and is usable - and is completed within the delivery window, there's no issue. It's an issue if you can't.

/My job is also to reign in the customer when you think their requests are unreasonable.
 
2012-12-09 10:55:28 PM
coded for decades from stratch w/o c/p from the web
now, I'm over it.

If someone living in a basement has got something good
on "just one more" language I have to learn, then I'll use it.

beside, knowing what you're asking the system to do efficiently
and filtering out the junk is more than enough to keep me ahead of my competition.
 
2012-12-09 11:09:25 PM
My experience level is pointless to describe; however, within its confines, I have come to conclusion that math people absolutely and uncorrectably suck at programming. They sure to do think they know what what they are doing, but they truly are dismal. Without exception. It's like high-level hardware people who say that they know everything there is know about programming, they suck too.

//Cut and pasters are vermin
//SQL is not programming
//SAP is not programming
//Script kiddies are not programmers
//I have met only a small handful (
 
2012-12-09 11:10:10 PM

hershy799: I run numerical weather prediction models (seriously), so I'm getting a kick out of these replies. That said, there's no way in hell I could program one of those myself. Actually, I take that back -- I could program one that was ridiculously inefficient and only ran in serial.

I don't care about object-oriented programming for what I do -- it's all just FORTRAN code that needs to solve equations SUPER SUPER SUPER FAST. I wish I knew/understood parallel computing/programming better.

/Gets to run on some of the fastest supercomputers in the world... eagerly awaiting this


WRF? I'm currently using ARPS, but that's primarily because the available microphysics and some supporting packages weren't available for WRF yet. I've thought about CM1 and COMMAS, but I'd really like something that includes a spectral bin microphysics package since it'd make my life easier...
 
2012-12-09 11:20:53 PM

Dinjiin: try going from C to LISP. Holy fark, that was different.


Ugh, I'd almost rather actually have a lisp than program in LISP ever again.
 
2012-12-09 11:28:24 PM

DeaH: My job is also to reign in the customer


As noted, poor bastards. Can't think of anything more fun to do in a day than tell an important customer something they don't want to hear.
 
2012-12-10 12:11:04 AM

JustSurfin: I ran into a new programmer at a conference. He's a Jave programmer. Java only. Period. I asked him how many languages he thought he would ever need and he said "Java and maybe Javascript". Then he asked me how many programming languages I've used (I've been in the biz since the late 70s). I was still listing languages 5 minutes later when his eyes glazed over and his brain rebooted.

That was fun. Java punk. You want my job, you got a lot of studying to do.


That is pretty much how things are. Fresh out of college coders are lucky to have a good understanding of 2 or 3 languages at most and many specialized with one.

They kind of freak out when you tell them you use twice that many languages on a daily basis.

Luckly I can't get to 5 minutes of listing languages.. So far at only 16 or so with 5 or so being commonly used on a daily or weekly basis.

Some languages just work better than others for different tasks.
 
2012-12-10 12:16:51 AM
Heh,

I started teaching myself PHP and ASP just because I had some web-based ideas, and I wanted to figure out how to make them happen. Since then, I've been working at coding more efficiently, whenever I can. It's been a great learning experience, but, having started in, and working only within, a web browser-only medium (I already had several years of HTML under my belt when I started with PHP and ASP), and speaking to other developer friends about some of the work they do (Ruby on Rails, for one, comes up a lot), I feel like I'm missing out on something (actually, a lot more than just "something").

Any recommendations for a curious beginner like myself, looking to break out of web-oriented programming?
 
2012-12-10 12:23:32 AM

Jay CiR: Any recommendations for a curious beginner like myself, looking to break out of web-oriented programming?


Depends what interests you, really. You could learn to create smartphone apps, write your own database, play with an Arduino, visit a senior center and learn COBOL... the possibilities are endless.
 
2012-12-10 12:27:58 AM

Jay CiR: Heh,

I started teaching myself PHP and ASP just because I had some web-based ideas, and I wanted to figure out how to make them happen. Since then, I've been working at coding more efficiently, whenever I can. It's been a great learning experience, but, having started in, and working only within, a web browser-only medium (I already had several years of HTML under my belt when I started with PHP and ASP), and speaking to other developer friends about some of the work they do (Ruby on Rails, for one, comes up a lot), I feel like I'm missing out on something (actually, a lot more than just "something").

Any recommendations for a curious beginner like myself, looking to break out of web-oriented programming?


I recommend learning C(procedural) and C++(Object-Oriented). If you can learn to program well in those languages (it's possible to write horrible yet correct code) then you will be well on your way since a lot of languages are patterned after them.
 
2012-12-10 12:35:02 AM

Dinjiin: JustSurfin: That was fun. Java punk. You want my job, you got a lot of studying to do.

The stupid thing is, since Java is derived from the C programming language, it wouldn't be hard for him to learn other derivatives such as ANSI-C, C++, C♯, Scala or Perl. Biggest issue would be the jump from object-oriented programming to procedural programming in ANSI-C and Perl.

If you want an alien landscape, try going from C to LISP. Holy fark, that was different.


Perl is object-oriented. Or perhaps it's most accurate to say that it can be.

You can get away with banging out procedural code, but just about anything useful out of CPAN or any kind of production processing in Perl should utilize objects.

But yeah, Perl tends to drive Java developers into a rage. I think they like having their periods.
 
2012-12-10 12:52:13 AM

Swoop1809: Rockstone: Swoop1809: Hopefully I transition back into development in the near future, preferably not in COBOL which is what I am doing business analysis for, once our services are re-developed into Java.

People keep telling me we don't use COBOL anymore, but I know that isn't true.

COBOL is still everywhere large amounts of data need processing. Banks, UPS, Amazon all have mainframes that utilize COBOL. It isnt going away in the near future either. The company I work for is phasing it out because no one my age (23) learns it anymore, we learn object oriented languages, and the old guard developers are getting expensive. . Most COBOL developers we have are contractors or offshore.


Interesting - I've never touched COBOL and haven't even been aware of it being used anywhere I've worked in the last decade or so.

I have a very bad impression of COBOL programmers. It's probably not fair for me to think of them all that way, but the ones I did deal with in the past were absolute morons and lazy as well.
 
2012-12-10 12:58:10 AM

jimmiejaz: 10 REM "Another green for me"
20 PRINT "Green"
30 for t=1 to 300
40 CLS
50 next t
60 goto 20
1000 END


So the "program" is going to flash the word "Green", clear the screen 300 times, and then do that forever?
 
2012-12-10 01:11:05 AM

jimmiejaz: 10 REM "Another green for me"
20 PRINT "Green"
30 for t=1 to 300
40 CLS
50 next t
60 goto 20
1000 END


Let's rewrite that using copy/paste methods:

10 REM "Another green for subby"
20 PRINT "Green"
30 CLS
40 CLS
50 CLS
60 CLS

You get the idea.

I guess the line numbering n BASIC really farks with copy/paste
 
2012-12-10 01:12:52 AM

hershy799: I run numerical weather prediction models (seriously), so I'm getting a kick out of these replies. That said, there's no way in hell I could program one of those myself. Actually, I take that back -- I could program one that was ridiculously inefficient and only ran in serial.

I don't care about object-oriented programming for what I do -- it's all just FORTRAN code that needs to solve equations SUPER SUPER SUPER FAST. I wish I knew/understood parallel computing/programming better.

/Gets to run on some of the fastest supercomputers in the world... eagerly awaiting this


Actually, Fortran is much worse than c++ these days. The problem is that there are large classes of optimizations that are not possible to express in Fortran if you have iterated calculations like matrix equations, vector products, integrations, and a number of similar operations. In these you typically have many temporary variables to calculate sub expressions. Even if you try to remove them by hand you face: 1) you cannot take advantage of any libraries then for any of the ops, and 2) the memory model still forces a number of temps.

C++ expression templates solved this in a way unavailable to almost any language (except D). They allow types to be the temporaries and the type mechanism composes the operations to remove the temporaries by the compiler. C++ matrix libraries are much faster these days than any other language's. Even faster than c. You need a good type system for that.
 
2012-12-10 01:21:14 AM
ftfa:  But here's the scary part. Although the basics don't require maths, as soon as you venture out of the world of website and app building you do need to become familiar with more complicated mathematical theory and practice - and even some physics and perhaps even some relativity if you want to go into game programming.


Wait, what?
 
2012-12-10 01:32:37 AM

Happy Hours: jimmiejaz: 10 REM "Another green for me"
20 PRINT "Green"
30 for t=1 to 300
40 CLS
50 next t
60 goto 20
1000 END

Let's rewrite that using copy/paste methods:

10 REM "Another green for subby"
20 PRINT "Green"
30 CLS
40 CLS
50 CLS
60 CLS

You get the idea.

I guess the line numbering n BASIC really farks with copy/paste


Let me rewrite that in COBOL for you.... Naw it would take a whole page of code.

But - COBOL remains popular because it supports a "decimal" data type so financial calculations actually come out right. Try representing 0.33 in binary.
 
2012-12-10 02:00:46 AM
I'm no good at maths, but I am good at readings
 
2012-12-10 02:17:08 AM

Jay CiR: Heh,

I started teaching myself PHP and ASP just because I had some web-based ideas, and I wanted to figure out how to make them happen. Since then, I've been working at coding more efficiently, whenever I can. It's been a great learning experience, but, having started in, and working only within, a web browser-only medium (I already had several years of HTML under my belt when I started with PHP and ASP), and speaking to other developer friends about some of the work they do (Ruby on Rails, for one, comes up a lot), I feel like I'm missing out on something (actually, a lot more than just "something").

Any recommendations for a curious beginner like myself, looking to break out of web-oriented programming?


Learn one high level (C) and one low level language (assembly, be it ARM or x86 or whatever). Get a solid foundation in data structures and algorithms first - where you really understand what the system is doing. Then learn a language with object oriented extensions (e.g. C++).

Remember, object oriented programming is a design methodology, not a language. You can do object oriented programming in pretty much any language. I also wouldn't recommend starting out with C++. It has all kinds of potential ugly habit generators (e.g. try/catch/throw blocks, declaring variables wherever, etc...).
 
2012-12-10 02:34:38 AM

Doc Ok: I was a self-taught programmer during high school, and wrote and sold (small) business software. I thought I was the hottest stuff ever. Then I started information science / computer science at university, and realized that I was total shyte before.

So if anybody tells me that being a good programmer doesn't require any format education or knowledge, I nod politely and ignore them afterwards.


It doesn't require a formal education, but that certainly helps. I think the problem with 'self-taught' is that people read the beginners books and learn how to program, but never learn how to be a programmer. It's basically the same way that you can learn to write, but that is a long way from learning to be a writer. If literacy were all it took to be an author, we'd all be Hemingways. Likewise, being able to read and write code is the first step on the path to being a programmer, not the last. I think too many people don't see that, they reach a point where they think they're "done".

Further education will help, or many, many years of trial, error, and introspection (i.e. the wisdom to realize when you've coded yourself into a corner, and the imagination to see how you should have done things differently). But there are still good self-taught options, you just need to be committed to self-improvement.
 
2012-12-10 02:49:56 AM

Jay CiR: Any recommendations for a curious beginner like myself, looking to break out of web-oriented programming?


One reason I like the Microsoft .net framework is that it runs in a whole load of ways. You can build console applications, desktop applications, services, web services, websites and they have a load of supporting libraries for each. I can apply my c# skills to any of them, import one of my own libraries (e.g. for validation) from a web project into a service.

Sure, it means you are basically stuck on Microsoft kit, but for me, that's a small price to pay for all the goodies I get.
 
2012-12-10 03:10:12 AM

Happy Hours: Swoop1809: Rockstone: Swoop1809: Hopefully I transition back into development in the near future, preferably not in COBOL which is what I am doing business analysis for, once our services are re-developed into Java.

People keep telling me we don't use COBOL anymore, but I know that isn't true.

COBOL is still everywhere large amounts of data need processing. Banks, UPS, Amazon all have mainframes that utilize COBOL. It isnt going away in the near future either. The company I work for is phasing it out because no one my age (23) learns it anymore, we learn object oriented languages, and the old guard developers are getting expensive. . Most COBOL developers we have are contractors or offshore.

Interesting - I've never touched COBOL and haven't even been aware of it being used anywhere I've worked in the last decade or so.

I have a very bad impression of COBOL programmers. It's probably not fair for me to think of them all that way, but the ones I did deal with in the past were absolute morons and lazy as well.


The reason why most COBOL programmers are morons are because they either don't want to put the effort into learning a harder language or they've burnt so many bridges that employers will only keep them around because they know a dinosaur language. COBOL is way more simplistic than qBasic and anyone can learn COBOL... nobody wants to though.
 
2012-12-10 03:11:24 AM

Jay CiR: Heh,

I started teaching myself PHP and ASP just because I had some web-based ideas, and I wanted to figure out how to make them happen. Since then, I've been working at coding more efficiently, whenever I can. It's been a great learning experience, but, having started in, and working only within, a web browser-only medium (I already had several years of HTML under my belt when I started with PHP and ASP), and speaking to other developer friends about some of the work they do (Ruby on Rails, for one, comes up a lot), I feel like I'm missing out on something (actually, a lot more than just "something").

Any recommendations for a curious beginner like myself, looking to break out of web-oriented programming?


GIANT WALL OF TEXT WARNING.

(Keep in mind that I'm a college senior with a couple internships, so 1)the older guys might have better advice, and 2)this all comes with a big "In my limited experience" caveat)

My experience has been that there are 2 camps of programming languages (and I'm generalizing like MAD). Scripty (of which web is a subset, so this is your LISP, Python, Perl, Ruby (on rails), JS, HTML, etc.), and Heavy (mostly languages that evolved from C, so C/C++, JAVA, C#, etc). Scripty is usually an interpreted language that runs inside of something else, is extremely flexible, weakly and dynamically-typed, and very agile. Heavy is usually a compiled language, with odd constraints because of that. Heavy also lends itself well to big, carefully-architected projects based around OOP. .They're also way less flexible (Try doing a Ruby Hash in C++, for example). They both work, and they both have different metaphors, and canonical ways of writing code.

You already have a fairly strong basis in the scripty stuff, but most of the not-web stuff is written in heavy languages. So (and keeping in mind that I'm giving you the same advice as a freshman, who knows nothing about coding, so you may already know some of this):

0) Get out of the IDE's for at least steps 1-3.

Pull up a Linux VM (Mint is quite good and easy to learn), write in Emacs/Vim (And there will be an UNHOLY flamewar about which of these to use. I use vim/gvim because my mentor used vim. If you use vim, pull up vimtutor in the command line FIRST to learn WTF you're doing. Either way, my personal advice is to make your desktop background and screensaver lists of useful commands for your particular editor until you've learned all the commands), compile with command line gcc/g++ and makefiles, and run from the command line. When you start using malloc()/dealloc() or new/delete, run everything in Valgrind to make sure you have no memory leaks. Do it yourself, so you know what's going on.

1) Learn a couple of heavy languages.

C/C++ would be my preferred one. C++ syntax sucks a lot, but having to explicitly use pointers and references vs. values, overload operators when necessary, and manage your own memory is really critical to understand what is going on at a low level, and JAVA/C# abstract a lot of that stuff away as part of being managed code (esp. the all-important memory management).

Write some pure C on the side to do some procedural stuff (It really is a different paradigm than OOP), realize just how dangerous pure C is, and how awesome C++ with the standard library (esp. C++ 11 with all the new stuff and extra standard libraries as part of the language) really is (std::string vs. null-terminated char *, vector vs. array., templating vs. unsafe void * casting, etc).

As part of this, learn how to use const properly in C++. There's like 4 places const can go in a function definition, and it's REALLY, REALLY HARD to kinda use const, because the compiler tends to throw a fit (that you often can't do a thing about or even figure out what it's yelling at you about in the first place), so you either don't use it at all, use it correctly from day 1 of your project, or devolve into a giant muddle of calls to const_cast.

2) Learn pointers. Know Pointers. Love Pointers. (Start using C here)

I had 15 different interviews this fall ask me the question about how to reverse a singly-linked list (which is really easy if you get pointers, and really insane if you don't). Learn what the difference is between Clock * c1ptr = c2ptr, and Clock c1 = c2; Be able to think at multiple levels of abstraction easily. Be able to avoid segfaults (and remember that segfaults are a good thing. The alternative is messing up your heap and stack, and you NOT KNOWING, and getting very, very subtle bugs as a result).

You either can do this or you can't. If you can't do this, give up and go back to web programming, because you'll never be a good "heavy programmer" since EVERYTHING is based around this.

While you're doing this, learn Angry C (also known as "WTF" C). Know all the stupid tricks about Operator Precedence and how to use them. Know why "while(*dest++ = *src++);" copies a null-terminated c-string. Use the ternary operators. Even better, use nested ternary operators (1 == x ? foo() : 2 ==x ? bar() : baz();). Put assignment in a while loop's condition (And then after you do that by accident a few times ('=' vs '=='), ask yourself why I did 'value' == 'variable'). Use case fallthrough in interesting ways. Try and do as much as possible in one line of code. (Don't keep doing any of this beyond this step though. Even if it works, your fellow programmers will lynch you. Think of it as a rarely-used tool in the toolkit. Just because you CAN use the comma operator or Duff's Device doesn't mean you SHOULD.).

I'd also write a couple of type-independent data structure implementations using void * just to learn how to deal with casting and the utter lack of type-safety.

3) Learn algorithms and data structures. (Start using C++ here)

If at all possible, do this in a formal setting, like a college course where you have to implement various data structures on your own.

For algorithms, LEARN BIG-O. Learn why O(1) vs. O(lg n) vs O(n) vs. O(????) matters. Know the Big-O time and space complexity of every algorithm you run across. Know how to at least kinda guess at the Big-O of an algorithm. KNOW ALL THE SORTS (lot of interview questions here. Know quicksort, merge sort, insertion sort at minimum, and be able to crank out code on command). Learn how to optimize your code for time and/or memory.

For data structures, write your own singly-linked list, doubly-linked list, vector, map, set, unordered_map (also known as hashtable), and deque classes in C++ with pointers and manual memory. Make them all templated, and make them all have iterators. Learn their Big-O's for lookup, insertion, and removal, and know what that makes them good for. EVERY SINGLE INTERVIEW I had at companies that I would have wanted to work at had AT LEAST 1 question that was "Tell me about Data Structure X". The company that I accepted at had a 2-hour interview (as part of an all-day interview) that was nothing but me and a guy with a PHD in data structures shooting the breeze, and filling up 2 separate whiteboard walls with scribbles, notes, thoughts, etc. Data structures are utterly critical.

4) Learn OOP.

Inheritance; multiple (and diamond. Even though this is frowned upon, if you know how to make it not-screwy, it's a valuable, if seldom-used tool) inheritance; composition vs. inheritance; public, protected, private; abstract classes; virtual functions; dynamic casting, all that good stuff; This is the toolkit that you'll be applying when you...

5) Learn software architecture.

You probably already know this from your web experience to a certain extent. Learn the design patterns you don't know (Singleton, Factory, and MVC are probably your big ones here.). Know when to use them, what they're good for, etc. Know how to decouple a class from another class, and have discrete pieces of functionality in separate places in the code. BEST CODE IS NOT FASTEST CODE. BEST CODE IS MAINTAINABLE AND EXTENSIBLE CODE. Also, at some point in here, learn the various std::???_ptr classes. They're really cool, really powerful, really dangerous if used improperly, and this is about the point where you'll really stop having a single point in the code where you can say "Yeah, I'm done with that pointer, and it can be deleted there".

6) Possibly at some point, learn about multi-threading and/or assembly.

For multithreading, Locks, deadlock, livelock, the up and downsides of pure and readwrite locks. I wouldn't necessarily recommend writing your own threading library like I had to for class, but just learning the basic concepts, and how to use the canonical library for your preferred language probably isn't a bad idea.

I've honestly never, ever had to learn or use actual assembly. I had a class with a minimally Turing-complete assembly language for which I had to write several C implementations that implemented various versions of the architecture, and they taught us about pipelining (aka: Why Lots of Jumps are Bad), and some of the basics of architecture and microarchitecture, but you're probably going to be high enough that it's not really a huge concern. Now if you want to write compilers, go the embedded systems route, or do serious, serious optimization work, learn it and learn it well, but there are millions of programmers who have never used (or even heard of) assembly, and are totally fine, good, competent programmers.

7) When you're done with C++, go over and learn either C# or Java.

They remove a lot of stuff from C++, make the syntax a lot nicer, and add a couple things I really like. They also:
*Make everything an object, and pass around references, so that there are no pointers, period.
*Don't require manual memory deallocation, so that you can new() to your heart's content.
*Remove multiple class inheritance, but add these things called Interfaces, which are basically fully abstract classes.

This does some odd things to the metaphors that C++ was allowing you to use ("I am a" vs. "I can do"), which does some weird things to "the correct way of writing code" and knowing what these changes are is critical. It's a subtly different way of thinking. Nothing like the huge transition you're making from the scripty side, but it's there.

Resources:

The definitive C89 book: The C Programming Language, 2nd Edition (called Kernigan and Ritchie): Wikipedia Amazon

The definitive C++98 Book: The C++ Programming Language (3rd Edition) by Bjarne Stroustrup: Wikipedia Amazon

Note that new editions of the above books are coming out soon, because we just got new versions of the languages. (C11, and C++11)

The definitive Design patterns book: Design Patterns: Elements of Reusable Object-Oriented Software (also called Gang of 4): Wikipedia Amazon

My class's algorithm book: Introduction to Algorithms, CLRS: Wikipedia Amazon

The class I took that was really good at teaching C/C++/software architecture (and is a requirement to get looked at by Google) was EECS 381 at the University of Michigan. I believe this link is open to everybody, and for the next week or so, all the projects are up so save it all to your computer (The professor puts the projects up as the semester goes on). Project 1 is C, Project 2 is C++ without the standard library (You reimplement std::string and std::list), Project 3 is the standard library, and "algorithm" (You're not allowed to use loops at all), Project 4 is architecture, project 5 is smart pointers that auto-delete memory, project 6 is the final exam. Also, since I took it, I believe that he rewrite the course for C++11 (Link)
 
2012-12-10 03:49:44 AM
I tried to learn C with this and all I ended up doing was flying around with the jetpack.
geekynicki.edublogs.org
http://geekynicki.edublogs.org/files/2009/09/ceebot.png
 
2012-12-10 04:26:11 AM

JustSurfin: But - COBOL remains popular because it supports a "decimal" data type so financial calculations actually come out right. Try representing 0.33 in binary.


Essentially every programming language has support for fixed precision arithmetic; it may not be part of C89 but it's something you could copy and paste into your project without any hassle. And for applications like you present here, where the precision is small and consistent, it's pretty trivial to just use ints internally and scale the input/output.

No, as other have mentioned the reason COBOL is still in use is simply because early adopters of computer systems (finance, insurance, etc.) wrote programs that they've never replaced. There's still work in COBOL, but not for new systems -- it's 100% maintenance of ancient tech.

COBOL isn't better for the job, and in a lot of ways it's worse. For example, on most medical/dental claims there can be a maximum of 8 services per claim; more than that and they have to start a second claim. That's a limitation straight out of 1962 when some COBOL programmer wrote a fixed-position flat file with 1 claim per line and slots for exactly 8 service items. COBOL encourages that kind of programming; you don't need a database because COBOL treats all files a databases, but it treats them as really terrible single-table databases. In the intervening years some companies have wedged in DB2 or somesuch in place of actual files (though not all of them; I have clients with millions of medical claim records in such files) but the limitation remains because the program still thinks it's dealing with the same fixed-position files someone with a poor grasp of data management invented 50 years ago.
 
2012-12-10 04:57:13 AM
Coding is simple and consists of only the following activity: pressing keys on a keyboard.
Of course, the trick is pressing them in the right order.

Or is it number arranging? In the end, a program is (and/or becomes, once compiled or processed) a long string of numbers. It seems that the actual arranging is the tedious job so we use high-level languages to describe how we want the numbers arranged.

Also, do programs really exist when they're not running?
 
2012-12-10 05:45:19 AM

meyerkev: GIANT WALL OF TEXT WARNING.


Your comment is interesting to me, but I'm fairly drunk - I'm going to open it in a new tab and maybe read it tomorrow.

At first I was going to make some snarky comment like there are 2 types of programmers (Me and everyone else), but you might have something worth saying.
 
2012-12-10 06:05:41 AM

midigod: FTA: "So in most cases you can see that the hard maths (the physical and geometry) is either done by a computer or has been done by someone else. "

Wow, what great career advice. "Don't worry, someone else will do the hard part." Holy crap.


Isn't that basically the mantra of every web developer? :P
 
2012-12-10 06:42:03 AM
MrEricSir
SineSwiper:
If you don't need portability, STOP USING JAVA!

Portability isn't a good reason to use Java. Not even in the top 10.


Seriously. Who is using Java on the server mainly for portability reasons? 

/funnily enough - given Java's reputation - I sometimes prefer to use it on the web for performance reasons
 
2012-12-10 07:19:19 AM

Roman Fyseek: hershy799: only ran in serial.

My office runs this massively parallel computing thingy. I was tearing my hair out over how the server knew when to feed more data to all the processes and when I finally asked the guy that wrote it, I felt stupid.

(hint: the server doesn't feed to the processes. The processes ask for more when they're finished with their current batch)

It's little shiat like that that will drive coders nuts and leads to wildly inefficient programming. Seriously, teaching yourself to code is easy. Learning to code right requires a qualified instructor.

Or, being Babbage or something.


Or a logical brain with forethought.
 
2012-12-10 07:23:14 AM

Professor Science: learn to ^c^v

Only be sure always to call it please "research."


Imitation is the sincerest form of programming.
 
2012-12-10 07:32:50 AM

rosebud_the_sled: //SQL is not programming


I agree, but there are some SQL statements of such incredible length and complexity that I have dealt with that it's pretty close once in a while.

meyerkev: GIANT WALL OF TEXT WARNING.

(Keep in mind that I'm a college senior with a couple internships, so 1)the older guys might have better advice, and 2)this all comes with a big "In my limited experience" caveat)


A lot of that stuff you mentioned is unnecessary depending on what type of programming job you're going after. There are thousands of business logic programming jobs out there that not only will you not be asked in an interview about pointers or data structures, but the interviewers themselves will find it hard to recall how to manage a linked list. C# and VB.Net type jobs with a lot of db calls are what I spent years doing and it was mostly pretty straight forward. OOP is used, but often not extensively and at times its usage is contrived in business apps.

Really for most businesses I worked with they never touched C++. The time it took for development was too costly and with almost no pay off for type of applications they wanted.
 
2012-12-10 07:33:08 AM
CSB time: I was working on a project in the recent past in which a previous coder (I make a distinction here between coder and programmer) had copy/pasted the same code 40 times within the same function, making small changes each time. I about fell out of my chair when I saw it. So I made a few tweaks to the underlying data structure, rolled the whole thing up into a nice little loop, and reduced the function size by about 2000 lines. Of course, this is the same project where we were forbidden to use pointers (at first), so there was a lot of passing large data structures around as function arguments. And they wondered why the code was so slow...

You see that kind of thing a lot in military applications, where many of the folks come from a background in ADA and have a hard time transitioning to C/C++ - in another project, we were pressured by the customer to hire a bunch of contractors, because for some reason headcount = progress. We wound up getting about two good programmers out of it, and the rest just caused more problems than they solved.

\ Had a professor once who was fond of saying "CPP does not stand for copy/paste programming!"
\\ Also, "Don't try to outsmart the compiler"
 
2012-12-10 07:34:22 AM

Sum Dum Gai: Doc Ok: I was a self-taught programmer during high school, and wrote and sold (small) business software. I thought I was the hottest stuff ever. Then I started information science / computer science at university, and realized that I was total shyte before.

So if anybody tells me that being a good programmer doesn't require any format education or knowledge, I nod politely and ignore them afterwards.

It doesn't require a formal education, but that certainly helps. I think the problem with 'self-taught' is that people read the beginners books and learn how to program, but never learn how to be a programmer. It's basically the same way that you can learn to write, but that is a long way from learning to be a writer. If literacy were all it took to be an author, we'd all be Hemingways. Likewise, being able to read and write code is the first step on the path to being a programmer, not the last. I think too many people don't see that, they reach a point where they think they're "done".

Further education will help, or many, many years of trial, error, and introspection (i.e. the wisdom to realize when you've coded yourself into a corner, and the imagination to see how you should have done things differently). But there are still good self-taught options, you just need to be committed to self-improvement.


I'm self-taught. Over a period of 15 years, and then 15 years of work experience. I've read, absorbed and applied hundreds of books. Worked with and learned from dozens of coders. Especially the bad ones.

Self-taught is possible. However I don't recommend it!
 
2012-12-10 07:41:27 AM

MayoSlather: blah


Oops. Proper line spacing would have made that easier to read.

/It's early
 
2012-12-10 07:45:41 AM

JustSurfin: Happy Hours: jimmiejaz: 10 REM "Another green for me"
20 PRINT "Green"
30 for t=1 to 300
40 CLS
50 next t
60 goto 20
1000 END

Let's rewrite that using copy/paste methods:

10 REM "Another green for subby"
20 PRINT "Green"
30 CLS
40 CLS
50 CLS
60 CLS

You get the idea.

I guess the line numbering n BASIC really farks with copy/paste

Let me rewrite that in COBOL for you.... Naw it would take a whole page of code.

But - COBOL remains popular because it supports a "decimal" data type so financial calculations actually come out right. Try representing 0.33 in binary.

  

If float math doesn't meet that requirement there is always bit shifting.
 
2012-12-10 08:53:45 AM

farkeruk: Do you know how to tell which plugins are worth using?


This is a skill unto itself. Every time I present a tool to my team, it's at the tail end of 40+ hours of research, spiking 2-3 different technologies. Then I try to make a change to the proof of concept, and see how easy that is. Then I put it on my personal site and see if it works from my phone, then leave it up for a couple of weeks to see if it crashes. Then I present it.

A good modern developer is a good integrator. Sometimes the solution isn't code, it's a tool, or service or library or platform. The best code is the code you don't write at all!
 
2012-12-10 09:03:35 AM
Back when I used to teach programming, I used to tell my students, "Bad software lives forever." There will never, ever be enough time or money to go back and do it right once that crappy initial version gets into production.

It was also one of my big reasons for hating Visual Basic. Time was (back when we wore onions on our belts) that you had to be a decent programmer even to write bad software. Then Visual Basic came along, and suddenly almost anyone could crank out bad software. The utterly predictable result of this was a landscape that was littered with terrible, awful, horrible software.

I once worked for a money management firm that managed billions--literally billions--of dollars of other people's money with apps that were Visual Basic 6.0 on top of Sybase/Unix. That damned front end was so brittle and fragile that you couldn't write a simple enhancement without the side effects breaking something completely unrelated. And they were stuck with it, because nobody was going to shell out the money to replace it.
 
2012-12-10 09:34:34 AM
hello world?
 
2012-12-10 09:35:19 AM

Cybernetic: Back when I used to teach programming, I used to tell my students, "Bad software lives forever." There will never, ever be enough time or money to go back and do it right once that crappy initial version gets into production.

It was also one of my big reasons for hating Visual Basic. Time was (back when we wore onions on our belts) that you had to be a decent programmer even to write bad software. Then Visual Basic came along, and suddenly almost anyone could crank out bad software. The utterly predictable result of this was a landscape that was littered with terrible, awful, horrible software.

I once worked for a money management firm that managed billions--literally billions--of dollars of other people's money with apps that were Visual Basic 6.0 on top of Sybase/Unix. That damned front end was so brittle and fragile that you couldn't write a simple enhancement without the side effects breaking something completely unrelated. And they were stuck with it, because nobody was going to shell out the money to replace it.


Very true. However VB 5/6 were always flawed though, and prone to breaking on non-programmer related issues. Sometimes function calls on basic controls just didn't work right, or sometimes updates to the operating system would screw third party controls or custom .dll's. If network admins weren't communicating they could be a development team's worst nightmare. It was a fragile development platform that produced fragile software. Those were different times though, instability was common on windows based client/server development, and the fact that VB 5/6 produced unstable software wasn't a surprise.
 
2012-12-10 09:44:44 AM
There's a big difference in knowing how to code and being a programmer. I know the Chemical Element chart but that does not mean I am ready to be a chemist.
 
2012-12-10 09:46:50 AM

traylor: My current title is "chief software engineer", I'm leading a small group of developers. 12 years of experiment in image processing and neural networks (artificial intelligence if you like), many developers passed under my umbrella and I have to say, the worst kind of them were those who were good at teh maths. Why? Because they were not creative. They were thinking in equations and not in code. When they implemented a solution for a problem they could not see the shortcomings, they lacked any critical thinking because they had the mathematical proof that they had done everything correctly. They lacked the ability to make one step further and make the solution any better than it was written in the research papers and studies.

Many of them had the habit to copy-paste some code from teh net, which was also a sign of the lack of critical thinking. It may be a good practice when you are implementing industry standards, but not when you need to deeply understand the code, and not when you are expected to make something that is better than what is out there.

Of course it is an advantage if you are good at the maths. But if it is all what you've got, you should not be coding. And forget ^c^v, it will only bring problems on the long term.


Then they actually weren't good at math. The way we teach math in our country is not based on problem-solving (which is how we teach CS), so people can get straight A's in undergrad math without ever straying from the algorithms/methods given in class. Take some one who is ACTUALLY good at math and they will be a superb programmer.
 
2012-12-10 10:01:32 AM
What this world needs is more people who think that coding is easy, and go into the industry with no real aptitude for it.

I call this "job security", as in contrast to these people, my middling skills make me look like a super star!
 
2012-12-10 10:04:49 AM

lc6529: There's a big difference in knowing how to code and being a programmer. I know the Chemical Element chart but that does not mean I am ready to be a chemist.


What are you talking about? The project manager's kid coded a complete UI in 2 days. If he can do it, why can't you?
 
2012-12-10 10:11:04 AM

lc6529: There's a big difference in knowing how to code and being a programmer. I know the Chemical Element chart but that does not mean I am ready to be a chemist.


Exactly... this article should be called "how to become that guy on the dev team that everyone hates".
 
2012-12-10 10:16:27 AM

Dinjiin: JustSurfin: That was fun. Java punk. You want my job, you got a lot of studying to do.

The stupid thing is, since Java is derived from the C programming language, it wouldn't be hard for him to learn other derivatives such as ANSI-C, C++, C♯, Scala or Perl. Biggest issue would be the jump from object-oriented programming to procedural programming in ANSI-C and Perl.

If you want an alien landscape, try going from C to LISP. Holy fark, that was different.


Been there, done that.
 
2012-12-10 10:17:45 AM

rosebud_the_sled: //SQL is not programming


Funny, I know a lot of programmers that can't write SQL for shiat.
 
2012-12-10 10:28:53 AM

DeaH: As a person who writes those requirements...


Well, then I gotta ask, then why can't the customers just take the specifications directly to the software people, huh?
 
2012-12-10 10:36:43 AM

burndtdan: rosebud_the_sled: //SQL is not programming

Funny, I know a lot of programmers that can't write SQL for shiat.


*raises hand*

I admit, I'm farking terrible at it. Anything more complex than a join or two and my brain turns to mush. I really don't get it. Thank Bog for entity framework and linq.
 
2012-12-10 10:47:36 AM
The article is a bit misleading, it talks about learning to code and then seems to imply that programming itself is just a lot of copying and pasting. So where does the code come from that you are copying? An actual programmer with years of experience? So does this mean that a newbie armed with a Self Help book on programming and a text editor is suddenly ready to write a complete
web based transaction system?

Does the newbie even understand what he/she just copied and pasted?

I know how to change the oil in my car, does this mean I can now go be a mechanic?

Lets see an article entitled "How to be a manager" Step 1 - Learn how to golf......
 
2012-12-10 11:19:11 AM

vossiewulf: mcmnky: *facepalm*

Logic is Math. Rantity rant rant...

I didn't say NO math, I said no math greater than third grade. Or maybe fifth grade. I know a zillion very logical thinkers who manage to do so without the use of differential equations, I guess you are unlucky. And you don't need trigonometry to profile code and based on experience, knowledge of what it's doing, and what it's supposed to do, know whether it's fast enough or as fast as it could be, and then drill down on the slow functions and improve them.

Dunno guy, I manage a large group working on code that generates revenue with numbers starting with a b, everyone is quite pleased with the quality and efficiency, and none of my guys needs to take a cosine of anything. The BI guys, that's a different story.

If you're working on code that's supposed to analyze complex data, involves physics, or any other number of math-intensive applications, yes you need good math guys. But as I said originally, there are large sectors of the coding world where that isn't the case.


*sigh*

Trigonometry is good for graphics, Algebra is good for understanding basic equation functions, but what every coder needs to know is Discrete Structures.Knowledge of recursion, NP complete, induction, etc... is vitally necessary for every code. All coders that I have ever encountered who could not even begin to explain the most basic of finite mathematics were always the worst coders I ever had the misfortune to work with.
 
2012-12-10 11:22:22 AM

lewismarktwo: I tried to learn C with this and all I ended up doing was flying around with the jetpack.
[geekynicki.edublogs.org image 642x482]
http://geekynicki.edublogs.org/files/2009/09/ceebot.png


Bwhahahahahaha.

Now build a real robot with real motors, tires, drive train and shiat. You will quickly find out that pretty little turn (45), move(50) is more like a turn(37) move(23) when applied to the real world.
 
2012-12-10 11:33:20 AM
burndtdan
rosebud_the_sled:
//SQL is not programming

Funny, I know a lot of programmers that can't write SQL for shiat.


In a way, from a theoretical perspective, one could say that SQL is closer to math than to programming.

I'm also one of those programmers who isn't too good with SQL, because I usually don't need a lot of it.
In most projects I've worked on, there's a lot of very simple CRUD stuff, i.e. most database stuff boils down to "select a,b,c from d where id=foo" or you don't even have to deal with SQL for simple persistence stuff like that anymore.

I mean, should I need stuff like cube, roll up or complicated subselects, I can look them up again and make things work.
But it will take a bit of time and fiddling around compared to e.g. some data analyst who works with databases a lot.


As the CS professor specializing in databases put it during the 30 minute long part about basic database stuff in one of my oral exams:
"I can see that you will arrive at the proper solution in finite time. However, fiddling around with SQL is neither the point nor very interesting, and we've got a lot of ground to cover and not much time. Now lets talk a bit about scheduling and serialization..."
 
2012-12-10 11:43:55 AM
Once you learn the basics learn how to manage data between threads. A good 90% of crashes these days are because programmers don't properly handle data that passes between threads. The other 10% of crashes are memory leaks.

/i should know i work on code that was written by people who can't handle passing data between threads
 
2012-12-10 01:11:18 PM

The Voice of Doom: burndtdan
rosebud_the_sled: //SQL is not programming

Funny, I know a lot of programmers that can't write SQL for shiat.

In a way, from a theoretical perspective, one could say that SQL is closer to math than to programming.

I'm also one of those programmers who isn't too good with SQL, because I usually don't need a lot of it.
In most projects I've worked on, there's a lot of very simple CRUD stuff, i.e. most database stuff boils down to "select a,b,c from d where id=foo" or you don't even have to deal with SQL for simple persistence stuff like that anymore.


I've known some programmers who are VERY good at SQL, and have a really deep understanding of things like query optimization. When you need someone like that (usually because your database performance is crap and is bogging down the entire system), they're worth their weight in gold.
 
2012-12-10 01:30:14 PM

JustSurfin: Then he asked me how many programming languages I've used (I've been in the biz since the late 70s). I was still listing languages 5 minutes later when his eyes glazed over and his brain rebooted.


Remind me to kill myself if I ever get stuck next to you in a plane.
 
2012-12-10 01:51:59 PM

Cybernetic: Back when I used to teach programming, I used to tell my students, "Bad software lives forever." There will never, ever be enough time or money to go back and do it right once that crappy initial version gets into production.


It was only a few years ago that I was still finding bad fixes for Y2K bugs. I wanted to kill someone. You just replaced the Y2K bug with a Y2.1K bug, you motherfarker. You know there's a solution to this problem that will work no matter what year it is, don't you?

"Oh come on, our software isn't going to be running 100 years from now."
"Wanna bet? You see how this company treats IT"
"Okay, but I won't be alive then"
"But your children will be maintaining your code! Think of the children!"
 
2012-12-10 01:54:13 PM

Happy Hours: I guess the line numbering n BASIC really farks with copy/paste


Not all versions of BASIC use line numbers. Microsoft BASIC for the Amiga used labels like you use in Assembly, so you'd have "goto here:" and "gosub there:" commands sprinkled in your code.
 
2012-12-10 02:02:24 PM

farkeruk: Sure, it means you are basically stuck on Microsoft kit, but for me, that's a small price to pay for all the goodies I get.


As long as you don't call Windows specific DLLs, you can supposedly get a lot of C♯/dotNet programs to work with Mono under BSD and Linux.
 
2012-12-10 02:25:47 PM
I'm on my last 2 weeks of Intro to Java for my pre-reqs, before I move into my first year of CS. I finished Intro to C++ last semester. Needless to say, the comments have definitely been eye-opening. Thanks, guys.
 
2012-12-10 03:49:30 PM

un4gvn666: I'm on my last 2 weeks of Intro to Java for my pre-reqs, before I move into my first year of CS. I finished Intro to C++ last semester. Needless to say, the comments have definitely been eye-opening. Thanks, guys.


Keep one thing in mind as you roll down the CS path. If your school's anything like my alma mater, the CS guys will look down on the Management Information Systems guys in the College of Business, for a variety of reasons.

Just remember, once you graduate, if you want the latest and greatest toys, there's something to be said for having someone around who's a geek, but who can also make the business case for the latest and greatest tech. Someone who can interpret code, and also speak MBA.
 
2012-12-10 04:07:14 PM
True story....

A department had a series of 'weekly reports' they'd generate and send up to the senior staff. It started off as a small Excel file, but over the years got bigger and bigger. Eventually it took two people most of every Monday to generate this Excel file. They did everything by hand and they always seemed to screw up something (that always went unnoticed).

They had an intern come in who had done a vague idea of what VBA was. The kid sat down with them and wrote some really, really ugly VBA macros that did the same thing. He worked on it for the better part of a month. His script ran in 15 minutes and took over the keyboard, but in 15 minutes, the report was done and it was always done correctly.

Fast forward 8 months. They wanted a change made. The intern was gone so they sent in an official development task (like I said, big company so everything needed to be a formal request to be approved and prioritized). The internal development team cited 10 standards that the VBA script didn't comply with. The code was copy/pasted/hacked together. That wasn't good enough. They were going to design a PROPER system. Lord knows, it's not like anyone has ever sat down and decided to make a 'reporting system' before.

They spent months, many months, designing this system. It was going to be the end-all, be-all of reporting (again, what an original idea!). I might be wrong on the details, but I think it was an SQL database they put together to populate the data, then an application (I think in VB) that would parse the data feed into the database, then they created a task in the scheduling system that would run the import job and alert them if it failed, then they wrote stored procedures to perform the calculations the Excel file used to do, then they wrote pages of Crystal Reports that would pull the data from the database.

Naturally, they made it so the reports looked nothing like the original report; and the higher-ups didn't like it. And bugs and mistakes were made along the ways, and releases were pushed out and sent to the QA department and all that jazz. Good times.

Eventually, they had it all working, including the small change the intern could have done in 4 hours. It took them over a year and endless man hours. But it was done 'right' by real 'Software Engineers'. And life was good. The new system had some problems - before if the CSV file showed up late, they'd just start the report late. Now they had to get someone with access to the job scheduling system to kick off the import job after it's initial attempt had timed out. And, it was fairly common for there to be bad data in the data file, instead of '71.81' they might get a value of '7181'; before they'd just fix it. But now they couldn't. If they knew SQL (and none of them did) they could have updated it in the database, but, 'officially' they needed to submit a trouble ticket to the DBA team who could update it on their behalf.....but that could easily take 4-5 hours before someone would look at it.

But okay, still, it was a working a system.

Then, one day, for reasons unknown to me, the senior VP asked for the .xls file. I guess he'd done it years ago and wanted to see the original Excel file and do some work with the numbers. Nobody had mentioned that the new system wouldn't generate a finished, formatted Excel file anymore. And that's what he wanted.

And even though it was months since he could do that, once he knew he couldn't, it was a high priority issue. I kid you not, the development team said, 'Oh yeah, we can do that' and started working on a batch job that would run after the import job that would pull data from the SQL database and use some Excel interop library to generate an Excel file.

I've never tried to create an Excel file from inside VB, but I guess spitting out data was easy enough. Even though they'd calculated all the values inside the stored procedures, the VP wanted to see the formulas in the Excel file - so they actually re-created all of the logic in the Excel file! Again! Only now it was in a VB program that created the Excel file.

What wasn't easy enough was getting all the cells colored the correct way and alignments and resizing and all the crap the ladies used to do by hand each Monday morning. I guess they got 'most' of it; but couldn't do all of it and ended up using a VBA macro to do it. Seriously. So, in the end.....

They had a task scheduling system that would kick off the data import VB application that would feed the data into and SQL database that the Crystal Report client would use to generate the report with the data from the SQL stored procedures that would be compared against the Excel file that the Excel file creation tool would generate. Then, when the numbers matched (and they always matched since they were generated the same way) someone would run the VBA formatting macro on the Excel file so they could include the Excel file along with the near identical looking Crystal Report generated PDF (I think it was PDF).

That was a very depressing place to work. But hey, at least we didn't have any cut-and-paste code cowboys doing simple things effectively.
 
2012-12-10 04:08:26 PM
tl;dr - people suck
 
2012-12-10 04:10:39 PM
I guess I am a little late to the party, but dear god no, that is horrible advice. Most peoples programming would be infinitely better if they simply disallowed copy and paste. If you ever find yourself copying and pasting code (either yours or someone else's), stop and rethink the situation. Maybe you should put the code into a function to avoid code duplication. Maybe create a library, if it is some one else's code. Consider abstraction or inlining, or any other number of constructs before blindly adding copypasta to code.

More often than not, copying and pasting leads to the propagation of bad or erroneous code. Or using code that is not fully understood.
 
2012-12-10 04:12:52 PM

EngineerAtWork: I guess I am a little late to the party, but dear god no, that is horrible advice. Most peoples programming would be infinitely better if they simply disallowed copy and paste. If you ever find yourself copying and pasting code (either yours or someone else's), stop and rethink the situation. Maybe you should put the code into a function to avoid code duplication. Maybe create a library, if it is some one else's code. Consider abstraction or inlining, or any other number of constructs before blindly adding copypasta to code.

More often than not, copying and pasting leads to the propagation of bad or erroneous code. Or using code that is not fully understood.


what if I'm copying and pasting my function?
 
2012-12-10 04:16:35 PM
Cybernetic
I've known some programmers who are VERY good at SQL, and have a really deep understanding of things like query optimization. When you need someone like that (usually because your database performance is crap and is bogging down the entire system), they're worth their weight in gold.


Ah, for me that's not "good at SQL", that's "good at databases" :-P

/well, ok, depending on the bottleneck, it's very likely both
 
2012-12-10 04:30:13 PM

treesloth: DeaH: As a person who writes those requirements...

Well, then I gotta ask, then why can't the customers just take the specifications directly to the software people, huh?


I use the requirements to write your specs.
 
2012-12-10 04:35:01 PM

redmid17: what if I'm copying and pasting my function?


The entire function, or the function call? If you are copying the entire function, I would stop and ask why. Maybe that should be encapsulated within another method.

If it is just the function call, I would still type it out. That way you could catch any errors (or not propagate errors) in the parameter list. If you are copying it because only one parameter is changing, why not determine the parameter ahead of time and call the function. Either way, copying and paste should be a warning flag. Granted, there may be time when it is appropriate. But you should always stop, take a breath, and ask yourself if there isn't a more efficient, less error prone way.

Taking a few extra minutes to code can save a few hours of debugging.
 
2012-12-10 04:39:17 PM

MrEricSir: Back in my day we learned to code by adding cheats to nibbles.bas. And we liked it.


Oh some of the mods we came up with. I added bonus levels, versus mode (not just multiplayer, but you could kill the opponent), and teleports, among other things. And I came up with a crudely networked version of gorilla.bas using polled message passing through the filesystem Very, very poor practice but that was all we had to work with.

I did have a friend who came up with his own 'casino games' type of software he was passing off as solely his own. Funny thing was I caught him using my code for a craps game because I never finished my game and his version was just as incomplete as mine (and displayed the same messages).
 
2012-12-10 04:43:01 PM
There are 10 types of people in this world.....
 
2012-12-10 04:44:25 PM

EngineerAtWork: redmid17: what if I'm copying and pasting my function?

The entire function, or the function call? If you are copying the entire function, I would stop and ask why. Maybe that should be encapsulated within another method.

If it is just the function call, I would still type it out. That way you could catch any errors (or not propagate errors) in the parameter list. If you are copying it because only one parameter is changing, why not determine the parameter ahead of time and call the function. Either way, copying and paste should be a warning flag. Granted, there may be time when it is appropriate. But you should always stop, take a breath, and ask yourself if there isn't a more efficient, less error prone way.

Taking a few extra minutes to code can save a few hours of debugging.


function call. I'm really lazy. Hell I set up my IDE to autocomplete the most common stuff I do.
 
2012-12-10 04:45:57 PM
Half Man Half Biscuit
There are 10 types of people in this world.....



i.imgur.com
 
2012-12-10 04:47:29 PM

vossiewulf: DeaH: My job is also to reign in the customer

As noted, poor bastards. Can't think of anything more fun to do in a day than tell an important customer something they don't want to hear.


You get used to saying things like, "It is possible. Just not in our current schedule or budget. Is this a priority?" That's usually the truth, too. If the customer is willing to throw unlimited money and time, they can get just about anything. They are never willing to throw unlimited time and money at things. They usually want an existing solution with a few tweaks.

It's fun when they want something totally new. That's actually the best, but the client has to understand that progress has to be in stages. And it is really important to set expectations. That's where dev. comes in. I need to know what is likely. And when the customer wants enterprise solutions when they've never had them before, it's time to be really careful. Often, they want to provide little or no control to anyone who is not at the corporate level. and they don't understand how that can kill productivity. My job is also to walk them through their end user's process.
 
2012-12-10 04:48:56 PM

Fark_Guy_Rob: True story....


I've seen similar situations. One of which spit out a report that used Lotus 1-2-3. My reaction was fairly predictable. Hey, the guys in our Utah office are still using Lotus 1-2-3. Uh, what's Lotus 1-2-3? It's what they used as a spreadsheet when wearing onions on your belt was still the fashion of the time. But it works! They get a report every week and they depend on it.

So I ask my boss if we can upgrade them. Nah - they're fine he said. Let them have their Lotus. In one sense he was right. It worked most of the time even though they were logging into an account of someone who hadn't worked for the company in years to generate this report every week, but in another sense he was dead wrong because I found out about it because people would call me up when it didn't work and I'd have to spend time figuring out WTF was going on with an ancient spreadsheet that was generated by some horribly hacked together scripts.

Who does this account even belong to? Oh, some guy who retired in 1995. I think he's dead now, but he was awesome at spreadsheets. What's this? The file gets saved to a floppy disk?

Seriously, they'd log in to an account on a plant system (AIX) that belonged to someone who hadn't worked for the company in years, save it to a floppy disk and put it in their desktop and run Lotus 1-2-3. And this was just a couple of years ago, and it wasn't a small company either.

I'm so glad I don't work for them anymore.
 
2012-12-10 04:49:16 PM

Half Man Half Biscuit: There are 10 types of people in this world.....


Those who understand binary, those who don't, and those who paid attention during their digital logic class lectures on Gray Code.
 
2012-12-10 04:52:41 PM

DeaH: treesloth: DeaH: As a person who writes those requirements...

Well, then I gotta ask, then why can't the customers just take the specifications directly to the software people, huh?

I use the requirements to write your specs.


Is that what you'd say... you do here?
 
2012-12-10 05:44:31 PM

Mad Canadian: jimmiejaz: 10 REM "Another green for me"
20 PRINT "Green"
30 for t=1 to 300
40 CLS
50 next t
60 goto 20
1000 END

So the "program" is going to flash the word "Green", clear the screen 300 times, and then do that forever?


Yup, because I did a copypasta but copied things wrong :D
 
2012-12-10 06:14:34 PM

Dinjiin: farkeruk: Sure, it means you are basically stuck on Microsoft kit, but for me, that's a small price to pay for all the goodies I get.

As long as you don't call Windows specific DLLs, you can supposedly get a lot of C♯/dotNet programs to work with Mono under BSD and Linux.


Kinda. You just have to make sure to use Environment.Newline and Environment.PathSeparator instead of string constants. I've always said "If it won't run in Mono, you shouldn't be writing it", but encryption and Microsoft-specific libraries were beastly. And you're always 2 years behind the state of the art.
 
2012-12-10 06:27:06 PM

treesloth: DeaH: treesloth: DeaH: As a person who writes those requirements...

Well, then I gotta ask, then why can't the customers just take the specifications directly to the software people, huh?

I use the requirements to write your specs.

Is that what you'd say... you do here?


Okay, maybe not YOUR specs. Although, maybe....
 
2012-12-10 07:32:20 PM

DeaH: treesloth: DeaH: treesloth: DeaH: As a person who writes those requirements...

Well, then I gotta ask, then why can't the customers just take the specifications directly to the software people, huh?

I use the requirements to write your specs.

Is that what you'd say... you do here?

Okay, maybe not YOUR specs. Although, maybe....


So you physically take the specs...and bring them to the engineers?
 
2012-12-10 07:38:35 PM

BumpInTheNight: DeaH: treesloth: DeaH: treesloth: DeaH: As a person who writes those requirements...

Well, then I gotta ask, then why can't the customers just take the specifications directly to the software people, huh?

I use the requirements to write your specs.

Is that what you'd say... you do here?

Okay, maybe not YOUR specs. Although, maybe....

So you physically take the specs...and bring them to the engineers?


Sometimes - but it's easier to put them on SharePoint, don't you think?
 
2012-12-10 08:09:31 PM

Happy Hours: So I ask my boss if we can upgrade them. Nah - they're fine he said. Let them have their Lotus. In one sense he was right. It worked most of the time even though they were logging into an account of someone who hadn't worked for the company in years to generate this report every week, but in another sense he was dead wrong because I found out about it because people would call me up when it didn't work and I'd have to spend time figuring out WTF was going on with an ancient spreadsheet that was generated by some horribly hacked together scripts.

Who does this account even belong to? Oh, some guy who retired in 1995. I think he's dead now, but he was awesome at spreadsheets. What's this? The file gets saved to a floppy disk?

Seriously, they'd log in to an account on a plant system (AIX) that belonged to someone who hadn't worked for the company in years, save it to a floppy disk and put it in their desktop and run Lotus 1-2-3. And this was just a couple of years ago, and it wasn't a small company either.


This is why I'm really, REALLY intolerant of VBA. I'm not in favour of total bans, but often, VBA is simply a reflection of bad processes in a company and people working around the processes rather than changing them. You have managers pressurising their staff to provide information or processes, and at the same time, tie up the IT department in procedures.

This should be dealt with by people going up the line and saying "look, which do you really want? Control, or speed", but most middle managers instead just tell their staff to find a way to solve it, and the answer is lashing together something with VBA, because it bypasses the process (the process that their senior management signed-off on). This isn't good. You have staff who don't know programming often learning a bit of it (time wasted, no real control or discipline). They're then using some of the least efficient development tools around.

It would be far better to just give those people's time (or the monetary value) to a development team to build it. And to then have different processes based on the risk of the system (one of the more serious problems with a development process is that you often have the same process for managing the development of the mission-critical stock control system as the development of the corporate website, when losing the corporate website for an hour ain't going to mean shiat).
 
2012-12-10 08:12:58 PM
cretinbob: How ya doin'?

If that's an attempt to get a piece of my allocation, then I'm flattered but I'll have to say no.

WxGuy1: WRF? I'm currently using ARPS, but that's primarily because the available microphysics and some supporting packages weren't available for WRF yet. I've thought about CM1 and COMMAS, but I'd really like something that includes a spectral bin microphysics package since it'd make my life easier...

Yes, I'm in the wonderful wonderful world of WRF. As far as your microphysics problem is concerned, did you consider making the scheme you wanted a new option for the microphysics namelist? I'm lucky enough (so far) that my tinkering with namelist options is restricted to one existing .F file rather than having to write a whole new .F file. Of course, it would take me at least a month to write a new physics option from scratch and implement it into the registry/whatever structure of WRF.
/WRF documentation is in dire need of an update
 
2012-12-10 08:46:01 PM

Half Man Half Biscuit: There are 10 types of people in this world.....


Those who understand binary, those who don't, and those who FileNotFound.
 
2012-12-10 09:12:28 PM

traylor: Half Man Half Biscuit: There are 10 types of people in this world.....

Those who understand binary, those who don't, and those who FileNotFound.


I don't get that last part
 
2012-12-10 09:45:29 PM

hershy799: traylor: Half Man Half Biscuit: There are 10 types of people in this world.....

Those who understand binary, those who don't, and those who FileNotFound.

I don't get that last part


It's a classic WTF, but forget it. Really, forget it. Just go outside, get drunk and meet some girl, live your life to the fullest, because you are a lucky noob who haven't had a slight glimpse yet into the deep Abyss that is the software industry.
 
2012-12-10 09:58:58 PM

hershy799: traylor: Half Man Half Biscuit: There are 10 types of people in this world.....

Those who understand binary, those who don't, and those who FileNotFound.

I don't get that last part


http://us.thedailywtf.com/Articles/What_Is_Truth_0x3f_.aspx
 
2012-12-11 12:09:16 AM
Meyerkev
Interesting stuff - thanks for the info. It definitely shows that, while I've come a long way since I've started scripting, it's just the tip of the iceberg in terms of what I still have yet to learn.
 
2012-12-11 06:18:01 AM

DeaH: BumpInTheNight: DeaH: treesloth: DeaH: treesloth: DeaH: As a person who writes those requirements...

Well, then I gotta ask, then why can't the customers just take the specifications directly to the software people, huh?

I use the requirements to write your specs.

Is that what you'd say... you do here?

Okay, maybe not YOUR specs. Although, maybe....

So you physically take the specs...and bring them to the engineers?

Sometimes - but it's easier to put them on SharePoint, don't you think?


That's not in the script! You're supposed to say "I sometimes give them to my secretary", damn it go rewatch office space :P
 
2012-12-11 11:14:14 AM

BumpInTheNight: DeaH: BumpInTheNight: DeaH: treesloth: DeaH: treesloth: DeaH: As a person who writes those requirements...

Well, then I gotta ask, then why can't the customers just take the specifications directly to the software people, huh?

I use the requirements to write your specs.

Is that what you'd say... you do here?

Okay, maybe not YOUR specs. Although, maybe....

So you physically take the specs...and bring them to the engineers?

Sometimes - but it's easier to put them on SharePoint, don't you think?

That's not in the script! You're supposed to say "I sometimes give them to my secretary", damn it go rewatch office space :P


Always good advice to rewatch Office Space, but I haven't had a secretary since the late '80s.
 
2012-12-11 11:57:56 AM

DeaH: BumpInTheNight: DeaH: BumpInTheNight: DeaH: treesloth: DeaH: treesloth: DeaH: As a person who writes those requirements...

Well, then I gotta ask, then why can't the customers just take the specifications directly to the software people, huh?

I use the requirements to write your specs.

Is that what you'd say... you do here?

Okay, maybe not YOUR specs. Although, maybe....

So you physically take the specs...and bring them to the engineers?

Sometimes - but it's easier to put them on SharePoint, don't you think?

That's not in the script! You're supposed to say "I sometimes give them to my secretary", damn it go rewatch office space :P

Always good advice to rewatch Office Space, but I haven't had a secretary since the late '80s.


WHAT THE HELL IS WRONG WITH YOU PEOPLE!?!?! 
ts3.mm.bing.net
 
2012-12-11 10:09:53 PM
Well, today I told my manager I was tired of doing Business Analysis and wanted to write code. So now Ill be learning COBOL to tide me over until I can get the training required to put me on a re-engineering team to do the same stuff Ill be doing in COBOL, in Java which is what I really want to do.

Oh well, writing COBOL still beats writing requirements documents and test plans. Fark test plans.
 
2012-12-12 10:26:13 AM

BumpInTheNight: That's not in the script! You're supposed to say "I sometimes give them to my secretary", damn it go rewatch office space :P


Phwew... thought I was remembering it all wrong!
 
Displayed 175 of 175 comments

View Voting Results: Smartest and Funniest


This thread is archived, and closed to new comments.

Continue Farking
Submit a Link »






Report