nickcv
Member
(04-01-2011, 01:27 AM)

nickcv's Avatar
GAF Devs Thread - a thread about programmer's rants #1

i made a search before opening this thread and i couldn't find one.

If you are a developer you are welcome inside this thread, no matter what's your programming language.

This thread is for rants! Your project manager made you rewrite for the 12th thousand time the same application because he has no clue about what does he wants?
your client keeps changing his mind because he read about the new trends on his 8th years old daughter magazine?

share with us!

just please don't use this thread to ask advices about coding!


_________________________

i'll go first.

at work we were working on an intranet software for a local company.
this company, among other things, does certifications classes for other companies and wanted a new software to manage all the classes, registration, test correction and everything else.
We spent months customizing this thing, also because they wanted it to be integrated with their current management software that is coded in COBOL(!!!!!).

In the last few weeks we didn't get any news from that company, so after losing my health after this thing my boss decided that we need to do something with this software and decided to sell it to another company.

Next week we'll have a meeting with those guys because they of course need some customization to make it work in their current intranet environment (and with my luck will be running with software written in fortran)
ronito
got my tag in the OT
(04-01-2011, 01:36 AM)

ronito's Avatar
#2

man I could write a book. And someday will.
Here's one:

"We need you to find out with this code right away!"
It was 32 pages long.
There was one, ONE, comment.
It came right before a huge 3 page for loop. It said:
//for loop
Drkirby
Corporate Apologist
(04-01-2011, 01:38 AM)

Drkirby's Avatar
#3

Did it at least have meaningful variable names? Or was it stuff like "Temp" "X" "i" "stuff" "function5"
BigNastyCurve
Member
(04-01-2011, 01:38 AM)

BigNastyCurve's Avatar
#4

Comments are for poor coders. Really REALLY good code is self-documenting. Small functions. Good function names.

edit: Which is not to say the code ronito was scanning was anything but garbage.
ronito
got my tag in the OT
(04-01-2011, 01:41 AM)

ronito's Avatar
#5

Originally Posted by Drkirby:
Did it at least have meaningful variable names? Or was it stuff like "Temp" "X" "i" "stuff" "function5"
Oh no, of course not!

Myvar1
Myvar2
Myvar5

And nothing was strongly typed.
Somnid
Corporate Ballwasher
Ignore everything I say
(04-01-2011, 01:43 AM)

Somnid's Avatar
#6

CMSs. Every goddam one. Also Facebook's social APIs are a piece of shit. I spent an entire work day getting a Like button to work because they cache the page data improperly and it breaks my shit.
nickcv
Member
(04-01-2011, 01:45 AM)

nickcv's Avatar
#7

Originally Posted by ronito:
Oh no, of course not!

Myvar1
Myvar2
Myvar5

And nothing was strongly typed.
the best thing is when inside the same script you find the same variable used to contain different kind of values across the script

line 1
Result (boolean value)

line 240
Result (string containing the result)

once i read an article about how to make the code unreadable
DualShadow
Member
(04-01-2011, 01:46 AM)

DualShadow's Avatar
#8

Originally Posted by ronito:
Oh no, of course not!

Myvar1
Myvar2
Myvar5

And nothing was strongly typed.
It's really not that hard to have decent variable names, if you're to lazy to even think up a decent variable name then you shouldn't be programming anything.
Fersis
It is illegal to Tag Fish in Tag Fishing Sanctuaries by law 38.36 of the GAF Wildlife Act
(04-01-2011, 01:48 AM)

Fersis's Avatar
#9

Same name variables in different scopes of the same class. Awesome ensues.
Hopefully i wont code (for a living) no more.
nickcv
Member
(04-01-2011, 01:49 AM)

nickcv's Avatar
#10

Originally Posted by Fersis:
Same name variables in different scopes of the same class. Awesome ensues.
Hopefully i wont code (for a living) no more.
how did you get your soul back?
mantidor
Member
(04-01-2011, 01:49 AM)

mantidor's Avatar
#11

I'm a developer, but not in the industry, can I join the thread?


I've fortunately not met many bad cases, but we did have once software from other company with global variables all over the place, it was a nightmare.

I really love programming, and I love games, I guess one day I'll do something about it, but it seems is the worst job in the industry, and its a terrible job in any area for that matter, you only do it out of love for the craft honestly.
ronito
got my tag in the OT
(04-01-2011, 01:51 AM)

ronito's Avatar
#12

Originally Posted by nickcv:
the best thing is when inside the same script you find the same variable used to contain different kind of values across the script

line 1
Result (boolean value)

line 240
Result (string containing the result)

once i read an article about how to make the code unreadable
Oh this idiot did just that.

And another one.
I was on a project that decided to outsource their development. So they took our designs which had the pseudo code. When time came for testing nothing worked. About 60% of the code they just copy/pasted the pseudocode in.
Somnid
Corporate Ballwasher
Ignore everything I say
(04-01-2011, 01:52 AM)

Somnid's Avatar
#13

Three simple rules for variable scoping:

_varName <= internal class-scoped variable
VarName <= public property or method
varName <= local variable

Remember this or I'll kill you.
BigNastyCurve
Member
(04-01-2011, 01:53 AM)

BigNastyCurve's Avatar
#14

Originally Posted by ronito:
Oh this idiot did just that.

And another one.
I was on a project that decided to outsource their development. So they took our designs which had the pseudo code. When time came for testing nothing worked. About 60% of the code they just copy/pasted the pseudocode in.
Oh man...I could tell some stories.
Fersis
It is illegal to Tag Fish in Tag Fishing Sanctuaries by law 38.36 of the GAF Wildlife Act
(04-01-2011, 01:58 AM)

Fersis's Avatar
#15

Originally Posted by nickcv:
how did you get your soul back?
I had to quit, i worked as gameplay programmer for 6 years (Two different studios. Each with crazy stories)
Looking for a game designer job now.
nickcv
Member
(04-01-2011, 01:59 AM)

nickcv's Avatar
#16

one year ago in the company i was working in we got two young guys (a boy and a girl) that had to stay with us for a University Stage
(here in Italy when you are on your second year of college you are forced to make some experience working for free somewhere)

they of course where majoring in IT.

They were working on a simple scrapper that had to grab some data from a webpage (not something we needed, but we had to give'em something to do!).

All of a sudden we lost our internet connection, so i told em to run their apache server locally and keep testing there.

After about ten minutes one of them comes to my desk saying:
"apache is not working"

so i follow him back to his seat and read in the firefox windows:
"firefox is in offline mode."
dogmaan
Girl got arse pubes.
(04-01-2011, 02:00 AM)

dogmaan's Avatar
#17

Here is an example of horrible code I wrote today. it's for coursework though so who cares

bool Date::setDate(string date)
{
string day;
string month;
string year;
if (date.size() == 10)
{
string::iterator iter = date.begin();

// dates are hard formatted dd/mm/yyyy at the moment
// horrible I know, sue me.

day.push_back((*iter));
++iter;
day.push_back((*iter));
++iter;
++iter;


month.push_back((*iter));
++iter;
month.push_back((*iter));
++iter;
++iter;


year.push_back((*iter));
++iter;
year.push_back((*iter));
++iter;
year.push_back((*iter));
++iter;
year.push_back((*iter));
}
Fersis
It is illegal to Tag Fish in Tag Fishing Sanctuaries by law 38.36 of the GAF Wildlife Act
(04-01-2011, 02:03 AM)

Fersis's Avatar
#18

I remember my first 'sleeping in the office' experience.
Do you guys remember your first crunch?

It was pretty awesome the first time, i was young and i rocked 14-18 hours days for weeks.
But then it became the norm =/
Kalnos
Member
(04-01-2011, 02:05 AM)

Kalnos's Avatar
#19

At work, the actual code itself is written fairly well.

When getting into our SQL database though, all hell breaks loose. Configuration tables, shitty naming conventions for tables and stored procedures, needing to update datatypes at later times (bit to integer), etc, etc.

Seriously, working on the front-end forms and logic that processes stuff from the database is awesome, but the database work is the pits due to shitty practices we have.


Originally Posted by BigNastyCurve:
Comments are for poor coders. Really REALLY good code is self-documenting. Small functions. Good function names.
Also, this is only partially true. I would agree that people comment shit that doesn't need commenting.

Bullshit:
I.E. Function LoadImage() //This function loads images

There are cases in difficult logic where commenting can help the reader understand what the fuck is going on, though.
Last edited by Kalnos; 04-01-2011 at 02:09 AM.
ronito
got my tag in the OT
(04-01-2011, 02:08 AM)

ronito's Avatar
#20

Originally Posted by Fersis:
I remember my first 'sleeping in the office' experience.
Do you guys remember your first crunch?

It was pretty awesome the first time, i was young and i rocked 14-18 hours days for weeks.
But then it became the norm =/
I don't even remember my first crunch. I do remember my worst one. Actually I wrote about it in one of the creative writing challenges. Urine was involved.

Originally Posted by BigNastyCurve:
Oh man...I could tell some stories.
Well that's what this thread is for.
CrankyJay
(04-01-2011, 02:08 AM)

CrankyJay's Avatar
#21

Originally Posted by BigNastyCurve:
Comments are for poor coders. Really REALLY good code is self-documenting. Small functions. Good function names.

edit: Which is not to say the code ronito was scanning was anything but garbage.
True, and the code doesn't necessarily do what the comments say.
Slavik81
Member
(04-01-2011, 02:13 AM)

Slavik81's Avatar
#22

Originally Posted by Somnid:
Three simple rules for variable scoping:

_varName <= internal class-scoped variable
VarName <= public property or method
varName <= local variable

Remember this or I'll kill you.
For C++ I like:
varName_
anyFunction
localVariable
ClassName

Mostly, I prefer trailing underscores for member variables.

It looks nicer, and it's less similar to reserved symbols (double leading underscores, underscore capital, or any leading underscore at global scope).

Though consistency is more important.
Fersis
It is illegal to Tag Fish in Tag Fishing Sanctuaries by law 38.36 of the GAF Wildlife Act
(04-01-2011, 02:13 AM)

Fersis's Avatar
#23

Edited because its bad practice for the newcomers.
Last edited by Fersis; 04-01-2011 at 02:17 AM. Reason: I was young and stoopid.
jvalioli
Member
(04-01-2011, 02:17 AM)

jvalioli's Avatar
#24

Originally Posted by CrankyJay:
True, and the code doesn't necessarily do what the comments say.
That's a little weird.

Code isn't commented very often at my place of work. There is usually a paragraph description at the beginning of a file and then that is it. Sometimes people are nice and write a some more in that header file. Company is somewhat young so its not too hard to track down the person that wrote it.
whitehawk
leeches are the best bait when attempting to land bass
(04-01-2011, 02:18 AM)

whitehawk's Avatar
#25

Originally Posted by Fersis:
I remember my first 'sleeping in the office' experience.
Do you guys remember your first crunch?

It was pretty awesome the first time, i was young and i rocked 14-18 hours days for weeks.
But then it became the norm =/
OH man. So glad I gave up programming after my first year of high school.
Zoe
(04-01-2011, 02:18 AM)

Zoe's Avatar
#26

Originally Posted by dogmaan:
Here is an example of horrible code I wrote today. it's for coursework though so who cares
First rule of programming GAF:

Use the damn [code] tag!
nickcv
Member
(04-01-2011, 02:21 AM)

nickcv's Avatar
#27

Originally Posted by Fersis:
Edited because its bad practice for the newcomers.
once my brother while trying to debug some code wrote in the middle of it

print(i love pu**y)

he couldn't find the problem so he mailed the code to another division inside the company, and of course he forgot to remove the print.

Quote:
That's a little weird.

Code isn't commented very often at my place of work. There is usually a paragraph description at the beginning of a file and then that is it. Sometimes people are nice and write a some more in that header file. Company is somewhat young so its not too hard to track down the person that wrote it.
you'll have a lot of fun in a couple of years when the person who wrote it left the company :P
Fersis
It is illegal to Tag Fish in Tag Fishing Sanctuaries by law 38.36 of the GAF Wildlife Act
(04-01-2011, 02:21 AM)

Fersis's Avatar
#28

Originally Posted by Zoe:
First rule of programming GAF:

Use the damn [code] tag!
Wrong the first rule of programming GAF is "My language is better than your language"

;)

Originally Posted by nickcv:
once my brother while trying to debug some code wrote in the middle of it
"print(i love pu**y)"
I invented a magic word 'BABABOO', i think that some games will be released this year with BABABOO inside their binary files.
Last edited by Fersis; 04-01-2011 at 02:24 AM.
jvalioli
Member
(04-01-2011, 02:24 AM)

jvalioli's Avatar
#29

Originally Posted by nickcv:
you'll have a lot of fun in a couple of years when the person who wrote it left the company :P
I'm an intern so not my problem haha
but yeah, I said the same exact thing to my boss. But most of that code that is reused is written by some high profile people there and by now I think there are lots of experts on it. Still kinda weird imo.
Haly
One day I realized that sadness is just another word for not enough coffee.
(04-01-2011, 02:24 AM)

Haly's Avatar
#30

This thread is a depressing vision of my future.
Chichikov
Member
(04-01-2011, 02:25 AM)

Chichikov's Avatar
#31

Originally Posted by Fersis:
I remember my first 'sleeping in the office' experience.
Do you guys remember your first crunch?

It was pretty awesome the first time, i was young and i rocked 14-18 hours days for weeks.
But then it became the norm =/
I've been in a bunch of startups, some successful, some not, and I have never ever slept in the office.

A good night (or sometimes, day) sleep is worth more than whatever you lose on your commute (though it should be noted that I've never lived too far from my workplace).

Like most super-crunch measures, it's counterproductive.
Fersis
It is illegal to Tag Fish in Tag Fishing Sanctuaries by law 38.36 of the GAF Wildlife Act
(04-01-2011, 02:25 AM)

Fersis's Avatar
#32

Originally Posted by Halycon:
This thread is a depressing vision of my future.
Do you like programming? Thats whats all about.
Working on something you like must be a blessing.
Kalnos
Member
(04-01-2011, 02:25 AM)

Kalnos's Avatar
#33

Originally Posted by Halycon:
This thread is a depressing vision of my future.
It's all about the company man. I have only ever had to work overtime once, but I'm at a small company of about 12 employees, so we are actually treated like human beings.

^Also what he said, if you like programming you will be fine, if you hate it then you will hate it.
rhfb
Member
(04-01-2011, 02:26 AM)

rhfb's Avatar
#34

Originally Posted by Halycon:
This thread is a depressing vision of my future.
Not really. Never slept at the office, or had a cram session. I've had plenty of alcoholic beverages on Friday though :)
Chichikov
Member
(04-01-2011, 02:28 AM)

Chichikov's Avatar
#35

Originally Posted by Kalnos:
if you like programming you will be fine, if you hate it then you will hate it.
I don't hate programing, but I don't like it all that much either.
It's fine as a job, but I don't code in my spare time or anything.

I did however have enough real jobs in my life to realize how lucky I am to have a well paying job that is no more physically taxing than browsing for porn.
nickcv
Member
(04-01-2011, 02:30 AM)

nickcv's Avatar
#36

Originally Posted by Kalnos:
It's all about the company man. I have only ever had to work overtime once, but I'm at a small company of about 12 employees, so we are actually treated like human beings.

^Also what he said, if you like programming you will be fine, if you hate it then you will hate it.
that's the main point.
it's kinda like being a doctor.
if you don't truly have the vocation don't do it.


even with all the horrible things that happen from time to time i still love my job.
Kalnos
Member
(04-01-2011, 02:30 AM)

Kalnos's Avatar
#37

Originally Posted by Chichikov:
I don't hate programing, but I don't like it all that much either.
It's fine as a job, but I don't code in my spare time or anything.

I did however have enough real jobs in my life to realize how lucky I am to have a well paying job that is no more physically taxing than browsing for porn.
That's cool, I don't see many people take your position though. It seems to usually be either a like it or hate it deal from my experience.
BigNastyCurve
Member
(04-01-2011, 02:32 AM)

BigNastyCurve's Avatar
#38

Originally Posted by dogmaan:
Here is an example of horrible code I wrote today. it's for coursework though so who cares

//abomination snip
Please tell me you're an Engineering major who has to take at least one CS class?
Tigel
Member
(04-01-2011, 02:32 AM)

Tigel's Avatar
#39

Originally Posted by Somnid:
Three simple rules for variable scoping:

_varName <= internal class-scoped variable
VarName <= public property or method
varName <= local variable

Remember this or I'll kill you.
Just for this time, do the opposite of this man's tag.
Andrex
ὁ αἴσχιστος παῖς εἶ
(04-01-2011, 02:33 AM)

Andrex's Avatar
#40

Someone convince me the cross-origin browser restriction isn't completely useless.

Originally Posted by ronito:
man I could write a book. And someday will.
Here's one:

"We need you to find out with this code right away!"
It was 32 pages long.
There was one, ONE, comment.
It came right before a huge 3 page for loop. It said:
//for loop
Yeah I remember there was another thread you had some great (sad) stories, would love to read a book of them.

Originally Posted by Somnid:
Three simple rules for variable scoping:

_varName <= internal class-scoped variable
VarName <= public property or method
varName <= local variable

Remember this or I'll kill you.
What if there is no class scoping? :P
Slavik81
Member
(04-01-2011, 02:33 AM)

Slavik81's Avatar
#41

Originally Posted by nickcv:
once my brother while trying to debug some code wrote in the middle of it

print(i love pu**y)

he couldn't find the problem so he mailed the code to another division inside the company, and of course he forgot to remove the print.
This is why I use lyrics from Queen songs.
Lathentar
Member
(04-01-2011, 02:35 AM)

Lathentar's Avatar
#42

Originally Posted by dogmaan:
Here is an example of horrible code I wrote today. it's for coursework though so who cares

bool Date::setDate(string date)
{
string day;
string month;
string year;
if (date.size() == 10)
{
string::iterator iter = date.begin();

// dates are hard formatted dd/mm/yyyy at the moment
// horrible I know, sue me.

day.push_back((*iter));
++iter;
day.push_back((*iter));
++iter;
++iter;


month.push_back((*iter));
++iter;
month.push_back((*iter));
++iter;
++iter;


year.push_back((*iter));
++iter;
year.push_back((*iter));
++iter;
year.push_back((*iter));
++iter;
year.push_back((*iter));
}
Please don't get a job as a programmer. Especially since this was for your school work.
Chichikov
Member
(04-01-2011, 02:36 AM)

Chichikov's Avatar
#43

Originally Posted by Kalnos:
That's cool, I don't see many people take your position though. It seems to usually be either a like it or hate it deal from my experience.
There are definitely more people who love to code in the business than people like me, I agree.
I was just making the point that you don't need to love coding like a hobby in order to be a successful programmer.
nickcv
Member
(04-01-2011, 02:39 AM)

nickcv's Avatar
#44

Originally Posted by Chichikov:
There are definitely more people who love to code in the business than people like me, I agree.
I was just making the point that you don't need to love coding like a hobby in order to be a successful programmer.
but i think that you need to love it to survive in the industry in the long run.

otherwise you are going to have a meltdown (or change job)
Chichikov
Member
(04-01-2011, 02:41 AM)

Chichikov's Avatar
#45

Originally Posted by nickcv:
but i think that you need to love it to survive in the industry in the long run.

otherwise you are going to have a meltdown (or change job)
I don't want to date myself here, but I've been doing this for over a decade.
Still going strong.
Andrex
ὁ αἴσχιστος παῖς εἶ
(04-01-2011, 02:42 AM)

Andrex's Avatar
#46

So what's everyone working on? At work (if you're allowed to talk about it) or on your own time?
nickcv
Member
(04-01-2011, 02:43 AM)

nickcv's Avatar
#47

Originally Posted by Somnid:
Three simple rules for variable scoping:

_varName <= internal class-scoped variable
VarName <= public property or method
varName <= local variable

Remember this or I'll kill you.

Quote:
For C++ I like:
varName_
anyFunction
localVariable
ClassName
i do something in between:

_varName <= internal class-scoped variable
VarName <= class name
anyFunction <= any function
var_name <= local variable

and of course

VAR_NAME <= constant
Slavik81
Member
(04-01-2011, 02:46 AM)

Slavik81's Avatar
#48

Originally Posted by Andrex:
So what's everyone working on? At work (if you're allowed to talk about it) or on your own time?
Goal: Transforming 11 million lat/lon/altitude coordinates into cartisian space in under a second to within a meter of accuracy.

Looking at CUDA/OpenCL.
Andrex
ὁ αἴσχιστος παῖς εἶ
(04-01-2011, 02:46 AM)

Andrex's Avatar
#49

Originally Posted by Slavik81:
Goal: Transforming 11 million lat/lon/altitude coordinates into cartisian space in under a second to within a meter of accuracy.
o_0 Godspeed, man.
Fersis
It is illegal to Tag Fish in Tag Fishing Sanctuaries by law 38.36 of the GAF Wildlife Act
(04-01-2011, 02:49 AM)

Fersis's Avatar
#50

Originally Posted by Andrex:
So what's everyone working on? At work (if you're allowed to talk about it) or on your own time?
Currently unemployed but on my own time im coding:
- Fighting Game Engine. (Just to learn more about my favorite genre)
- Basic FPS Engine. (Just to train myself at designing levels)
- Helping on some open source project. (Because the lead guy helped me before)

But im not into coding as much as before, in fact i want to drop it for good once i get a design job.