Jump to content

The Official Nerd People Problems Thread


lostone
 Share

Recommended Posts

some arsehole thought it was a good idea to include a bunch of header files in a c++ class. The **** headers c++ files have other c++ files in them...

3 layers of inheritance in this cluster and each has a minimum of 30 headers included in each class. It is basically one giant class cluster fu$&

Edited by lostone
Link to comment
Share on other sites

  • Replies 146
  • Created
  • Last Reply

Top Posters In This Topic

Heh this isn't one person...

Also single letter variable names fail code reviews and get you blackballed. What the h3ll is i and n???

I'm hoping i is for an iterator and n is for some key numeric value, otherwise you should find who wrote it and shoot them. Is there at least some decent commenting?

Link to comment
Share on other sites

Heh this isn't one person...

Also single letter variable names fail code reviews and get you blackballed. What the h3ll is i and n???

were they for loops, because I have been told that it is pretty standard for loops to use i to mean index. as well as j, if there is a nested loop.

Link to comment
Share on other sites

were they for loops, because I have been told that it is pretty standard for loops to use i to mean index. as well as j, if there is a nested loop.

For each loops unless you need to know the index. What are you trying to accomplish with the loop? Is it obvious if not farm it out to another method if possible. Be expressive, try to avoid side effects as much as possible.

The further our abstractions the less we understand. Java developers suck at memory management.

Link to comment
Share on other sites

For each loops unless you need to know the index. What are you trying to accomplish with the loop? Is it obvious if not farm it out to another method if possible. Be expressive, try to avoid side effects as much as possible.

The further our abstractions the less we understand. Java developers suck at memory management.

garbage collection FTW! I suck at memory management because of it. C and C++ is on my list of languages to learn to increase my knowledge of memory management in a practical sense, but It is pretty low on my list currently, because I have not found any good use cases for it.

I know to use foreach, but I was just saying that i and j are pretty standard for single name variables in loops. I prefer the foreach loop in general for data structures.

I used i and j for my loops when learning sorting algorithms like bubble, selection, quick, merge, etc.

Link to comment
Share on other sites

Bleh I don't care much for rehashing sorting. You are still learning so it's cool, I only care when it becomes a perf concern and usually that is either around burning CPU or causing too much GC.

If I were to learn a new language it would be scala... Pattern matching, type inference, passing a function to a function, tuples... #drool

Link to comment
Share on other sites

Bleh I don't care much for rehashing sorting. You are still learning so it's cool, I only care when it becomes a perf concern and usually that is either around burning CPU or causing too much GC.

If I were to learn a new language it would be scala... Pattern matching, type inference, passing a function to a function, tuples... #drool

For me to learn a new language, I feel like I was have to have a use case for it, so that I do not forget it or just stop using it once the novelty wears off. I am really into Mobile development lately, so I use Swift for iOS programming( also my bet for the future) and java for Android development.

Swift actually has most of those features that you mentioned. It really is a nice language, but it is closed source, which sucks, but I do think apple will open source the compiler and runtime, but we will see about the libraries.

Link to comment
Share on other sites

As someone who is firmly embedded in C++ and C#, working with Java at times can be annoying because of this, but I am a bit of a control freak.

Why do you want to deal with it? GC is pretty awesome. Just use as many stateless services as possible.
Link to comment
Share on other sites

Why do you want to deal with it? GC is pretty awesome. Just use as many stateless services as possible.

Most of my early programming days were with video games, and still is to an extent. Memory management is so different when it comes to games that I could write a pretty decent research paper on the differences alone. One example is how Java doesn't really allow you to work with GPU buffers. That's not my only gripe, it goes into stuff with the support (or lack thereof) for 3rd party libraries, even though Java's standard class library is very impressive.

Link to comment
Share on other sites

I see. since I am on the financial side, I have typically no reason to care about that. I have no insight into video game coding accept the stereotype that the work is harder, the pay is worse, the hours are terrible and it is not stable.

Link to comment
Share on other sites

Heh this isn't one person...

Also single letter variable names fail code reviews and get you blackballed. What the h3ll is i and n???

It always amazes me how when multiple people work on a code/script how it can quickly get out of hand. I am honestly shocked anyone who has a job as a coder would use a single letter variable. That's something you should be taught not to do in a 101 course.

Link to comment
Share on other sites

I'm old school(without the age), C was my first language. It was nothing to have 5 or 6 terminal windows open editing with VIM(I still despise these graphical IDE monstrosities). We use to joke that C++ was created because some azzhole couldn't manage a pointer to a structure. While not as neat or clean we had polymorphism with header MACROS long before C++ turned it into a class method.

On large scale projects I get the 'protect me' mentality with a Class::changeThisVariable()....but then data->a=1 never frightened me either.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share


×
×
  • Create New...