d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > Programming & Development > Make Me A Better Programmer - From Step 1
Prev18910111256Next
Add Reply New Topic New Poll
Member
Posts: 4,541
Joined: Sep 15 2011
Gold: 10,391.00
Jul 31 2012 04:14pm
As early as possible, preferably.
Member
Posts: 279
Joined: Apr 11 2010
Gold: 1,486.00
Jul 31 2012 05:01pm
You don't really "learn about" edge cases. They just exist.

Generally when you're working on a problem, you're thinking about normal cases. I need to sort a list, so I'm thinking about [5, 4, 9, 4, 2, 87, 5, 6]. I'm not thinking about []. But that case is there, and you need to know whether your program handles it.
Member
Posts: 279
Joined: Apr 11 2010
Gold: 1,486.00
Jul 31 2012 05:04pm
As for your prof and "bandages", there is definitely a difference between "correct output" and "correct logic". Even in a case where your program will give correct output for literally every input that exists, it might not be correct logic in the sense that it is so convoluted that it is impossible to untangle what's going on unless you were the person who built it.

Usually, however, programs that give "correct output" really only do so for a subset of all possible inputs. Sometimes you get away with this because you never encounter the input your program can't handle, but that doesn't mean that that input doesn't exist.
Member
Posts: 23,862
Joined: Aug 16 2006
Gold: 20.00
Jul 31 2012 07:33pm
Quote (PumblesMumbles @ Jul 31 2012 06:01pm)
You don't really "learn about" edge cases. They just exist.

Generally when you're working on a problem, you're thinking about normal cases. I need to sort a list, so I'm thinking about [5, 4, 9, 4, 2, 87, 5, 6]. I'm not thinking about []. But that case is there, and you need to know whether your program handles it.


yeah I think? we covered something similar to this.

Like in one example the prof. did he had an issue where if the length of the array was 0 (no elements) certain functions would error out so to fix that he put an IF before the calling of said functions.
Member
Posts: 30,712
Joined: Sep 19 2007
Gold: 340.00
Jul 31 2012 11:54pm
Quote (irimi @ 31 Jul 2012 13:49)
surefire sign of a terrible programmer: they think that automated testing and considering edge cases is QA's job.


when you have a team member whose explicit job description and role is to do so, I don't see what's wrong with it
we do team HAZOPs to identify the test cases and QA executes it
which cases have I missed for a simple sorting algorithm?
troll
Member
Posts: 4,541
Joined: Sep 15 2011
Gold: 10,391.00
Aug 1 2012 12:23am
not a troll. if you don't (or your company doesn't) understand the value - i'd even go so far as to say necessity - of developers writing tests for their own code, then you are a terrible (bunch of) programmer(s).

This post was edited by irimi on Aug 1 2012 12:24am
Member
Posts: 23,862
Joined: Aug 16 2006
Gold: 20.00
Aug 2 2012 12:21am
...and so I have finished cs1250!

In a few weeks I will be start cs2250: data structures n shit.

Can't wait.


What I learned in cs1250:

cout and cin
logical operators (I already knew em - based logic class)
= and ==
brackets, brackets everywhere
i++,i--,++i,--i
some stuff found in <iomanip>
if, else if, else
variable types
constants
loops
functions & return types
arrays
very very brief stint on pointers
pass by reference/value
Some unix stuff
Some vi stuff

prolly missing a bit

does that sound about right? (for the intro to CS course)
Member
Posts: 32,925
Joined: Jul 23 2006
Gold: 3,804.50
Aug 2 2012 12:35am
Quote (Eep @ Aug 2 2012 02:21am)
...and so I have finished cs1250!

In a few weeks I will be start cs2250: data structures n shit.

Can't wait.


What I learned in cs1250:

cout and cin
logical operators (I already knew em - based logic class)
= and ==
brackets, brackets everywhere
i++,i--,++i,--i
some stuff found in <iomanip>
if, else if, else
variable types
constants
loops
functions & return types
arrays
very very brief stint on pointers
pass by reference/value
Some unix stuff
Some vi stuff

prolly missing a bit

does that sound about right? (for the intro to CS course)


your first language is C++, but somehow they didn't teach you anything about OOP?
Member
Posts: 23,862
Joined: Aug 16 2006
Gold: 20.00
Aug 2 2012 01:06am
Quote (carteblanche @ Aug 2 2012 01:35am)
your first language is C++, but somehow they didn't teach you anything about OOP?


never said a word in fact!

I think the course was about the basic basic CS stuff rather than c++ specific stuff.

Mainly loops/functions/arrays etc.

Not to say OOP isn't basic (I wouldn't know) but we were taught things which can apply to any language I am guessing.

This post was edited by Eep on Aug 2 2012 01:08am
Member
Posts: 30,712
Joined: Sep 19 2007
Gold: 340.00
Aug 2 2012 08:48am
Quote (carteblanche @ 2 Aug 2012 00:35)
your first language is C++, but somehow they didn't teach you anything about OOP?


in the non honours stream at my university they teach java first and don't go into OO until the second semester...
obviously they teach a bit, so that you can use the libraries to print and read files, but they don't explain anything beyond "use it like this and it's magic, we'll show you more later"
The other stream they teach perl without OO until second semester
Go Back To Programming & Development Topic List
Prev18910111256Next
Add Reply New Topic New Poll