Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

 
Advanced search

999641 Posts in 39235 Topics- by 30649 Members - Latest Member: 7yp

April 24, 2014, 01:59:54 PM
  Show Posts
Pages: 1 2 [3] 4 5 ... 88
31  Developer / Technical / Re: How to develop unmaintainable software on: October 18, 2013, 05:53:35 PM
but when the dependencies are open source or when you just copy and paste code i don't think you give up any control at all.

Do you understand all of the code you just imported?  Do you know how it all works?  Do you understand the complete ramifications of your potential changes?  If the answer is no, you don't have control.  If the answer is yes, you've probably spent more time studying NoobLib internals than it would've taken to just write your own stuff.

Wait a minute... why the hell would anyone use jpg in a game?
32  Developer / Technical / Re: How to develop unmaintainable software on: October 18, 2013, 05:21:53 PM
some of that is true, but my point was that everyone on a project still has to use the company's choice for the project's game engine -- you could still alter it to your liking sometimes, but you would not have control over every aspect of it. if you're a programmer for starcraft 2 working for blizzard for example, unless you are specifically in charge of that aspect of it, you can't just change the game's image loading code to your liking, you have to use the code that everyone else working on the game uses.

The team's code is your code.  It scales when working with a team.


so i'd say that programmers working in large teams always have to deal with using code that they didn't write,

The point is not working with code you didn't write, the point is working with code you don't control.  For example, the MTGO servers have no third-party dependencies outside of boost (and I was even nervous about that one) precisely because we need to control the code.  When the servers go down, every minute is a minute we're not making money.  This stuff has to be fixed now.  If the problem lies somewhere in the bowels of NoobLib, we're screwed, and whoever approved the use of NoobLib is probably going to get fired.

so being able to deal with code you didn't write is an important skill for a programmer to have

So?  I've never claimed otherwise and this refutes none of my points.

The fact that I can't seem to get through to you is that dependencies are risk vectors.  A large part of software development is eliminating the risks you can, and minimizing the ones you can't.  Will you be able to eliminate all of your dependencies?  Most likely no, but adding new ones for something as incredibly trivial as an image loader is just irresponsible in my eyes.  I always make an effort to cut out dependencies I don't need, and I'm down to only a select few (OpenAL is next on my list, most likely).

Oh, and NoobLib is a great name, so someone needs to start working on that.
33  Developer / Technical / Re: How to develop unmaintainable software on: October 18, 2013, 04:26:56 AM
yeah but the programmer would be required to use the company's solution, which is often already done, rather than code their own

e.g. you'd have to use the company's already written imaging loading code, you still couldn't write your own

No, not at all.

These sort of internal things get rewritten rather frequently to keep up with changing requirements.  In fact that's exactly what I'm doing at my job right now.

And that is of course assuming it even exists.  Quite often it doesn't and you will be the person doing the initial write.

Every dependency is a liability.  Dependencies are bad, especially for longer term projects.  As previously noted having control over the code in a project is highly valued and is not something to be disregarded, nor is it a 'waste of time'.

There is nothing wrong with applying these principals to smaller, personal projects.  There are concerns beyond finishing something quickly.
34  Developer / Technical / Re: How to develop unmaintainable software on: October 17, 2013, 04:02:07 PM
But I want to remind you for a possible future reference. If you are planning to join a company who is working on big software then be warned. If they see you are reinventing a linked list instead of using the library you will get fired quickly.

I've worked on both the Microsoft Office team and the Magic Online team, and this is not the case.  In fact, in both of those jobs I had to "reinvent" things due to circumstances beyond our control.  In both cases, as well as my current job, the time I spent learning how to actually do things paid off enormously.

In fact, the time I took learning how to actually use the Windows API for my projects rather than relying on libraries like SDL was a major factor in landing my current job.
35  Developer / Technical / Re: How to develop unmaintainable software on: October 16, 2013, 08:07:28 PM
if you are programming just for fun, then of course it's not a waste of time if you enjoy it. but if you have a specific goal, then it's a waste of time in the context of achieving that goal

No it isn't.  Doing things this way is part of achieving the goal.

I choose my projects based on the methods I want to use in constructing them.  For me, the means of production are just as important as the final project.

For example, I have a side project for which I'm trying to express as much of the logic as possible in terms of C++ templates.  Finishing the project is fine, and I hope it will be great, but more important to me is the mastery of new coding techniques.  I'm thinking about the future, and learning how to do things in a way that I haven't done before.  In projects going forward, this techniques will come in handy and make me more productive in the long term.

For me, the code is the product.  This is part of the reason why I open source all of my work.  I'm proud of my code and I want people to see it.
36  Developer / Technical / Re: How to develop unmaintainable software on: October 16, 2013, 07:17:38 PM
it's *still* a time expenditure, you're better off creating another cool level than you are writing your own jpg loading code when you can just copy and paste some code for it or use a library someone else already wrote for it.

You mistake is assuming that writing such a thing is a waste of time.  I enjoy writing things like image loaders.  This is not a waste of time for me.

Quote from: Paul Eres
4000 lines of code, assuming an average of 10 words per line,

What the hell programming language are you using that averages 10 words per line?!  I've written Cobol programs that don't even approach that, and that's the most verbose language I've ever seen (save for Applescript, but we don't talk about that).

Busting out 5-10 lines per minute is not a difficult thing to do.  I'm not even a particularly fast typist, I've had colleagues that could do far more.

I'm going to take a wild guess here, and assume that you don't particularly enjoy programming.  For people like myself that greatly enjoy programming, learning how to do things yourself is its own reward.  It's more valuable to me to implement something that works exactly the way I want it to than to add some completely unneeded dependency to my project, one that forces my code to adapt to the way some other guy decided to do things.
37  Developer / Technical / Re: How to develop unmaintainable software on: October 16, 2013, 05:06:09 AM
yes, it comes from a study that was mentioned in that book. it's an average, but fairly accurate in my experience. lone programmers can certainly do more than that, especially near the start of a project, but when you are talking about big projects and big teams, the average is 10 lines per day.

also that story is irrelevant, because we were talking specifically about a function that is 150 lines long. the reason good programmers are more productive than bad ones isn't that they write more lines of code per day, but that they make those lines do more. but there's a limit to that. you simply can't write an image function to decode jpg's in 10 lines, no matter how good you are

(this is why so many programmers like python -- because it can get more work done in fewer lines, allowing them to be more productive)

but regardless of whether you agree with the specifics or not, whether we are talking 2 wasted weeks or 2 wasted days (at the abnormally high rate of 75 lines of code per day, which few programmers can maintain -- i've never known anyone that fast), writing your own code to load a jpg is still a colossal waste of time, you could spend those 2 weeks or 2 days on game logic, and get the game done much faster

150 lines of code for an image loader is trivial.  If you can't write that in 30 minutes, tops, you just aren't trying very hard.

Hell, I've written well over 1000 lines of code at work just this week so far, and that's in two days.  This is hardly unusual.

I think you're confusing mantainance programming with writing new code.  For a maintenance programmer, yeah, I'll buy 10 lines of code a day because you spend a lot of time trying to figure out where that code goes and how to not break things.  For new code, 10 lines a day will get you fired, plain and simple.
38  Developer / Technical / Re: How to develop unmaintainable software on: October 15, 2013, 03:58:16 PM
As in, you probably don't need 50 external libraries in a 2d platformer, but there's no reason to write a JPEG loader from scratch.

This is kind of what I'm talking about.  Image loaders are firmly in the "write it yourself" category.  My image loader is only 150 lines of code, and that's including comments, full error handling, and compressed image support.  Image loaders are actually really simple, and not worth adding some additional dependency for.
39  Developer / Technical / Re: How to develop unmaintainable software on: October 14, 2013, 03:44:01 PM
I think the advice not to write everything from scratch is kind of sketchy.  It really depends on what you're doing.  I've been involved in several projects that got stuck with discontinued libraries that are so entrenched in the project they've become impossible to remove.  New developers can't find any documentation on these things and keeping them working with newer compiler versions becomes a serious chore.

Windows API wrappers seem to be especially susceptable to this, and I've become very gunshy about using them as a result.
40  Developer / Technical / Re: Simple cross-platform gamepad library on: October 11, 2013, 08:46:38 PM
Just for fun, and to get some practice with Ada 2012, I went ahead and wrote up an Ada interface for this.

You can download it here if you want it.

I just made a more Ada-like layer over your C code while largely preserving its behavior.  The one thing I couldn't reproduce was the void* contexts to the callback functions, since Ada's insanely strong type system makes that sort of thing very hard to do in a way that makes any sense.

I'll admit that I haven't tested it at all, but it compiles fine, and for Ada that usually means that it works.
41  Developer / Technical / Re: The happy programmer room on: September 28, 2013, 08:06:35 AM
I'd prefer something that works for C and C++ as well. I know C++11 brought many new things (it's C equivalent also has many new things, too) but I'd like to stick to C for my personal projects.

GCC supports nested functions in C as an extension.  I'm not sure of the exact semantics though.
42  Developer / Technical / Re: [POLL] What C++/C IDE are you using? [WINDOWS] on: September 25, 2013, 03:01:24 PM
It's also worth noting that GCC handles more languages than Clang does.  That's a big deal to some people.
43  Developer / Technical / Re: [POLL] What C++/C IDE are you using? [WINDOWS] on: September 24, 2013, 03:56:08 PM
Vim, if that counts.
44  Developer / Technical / Re: The happy programmer room on: September 20, 2013, 04:59:17 PM
The fact that its not particularly difficult doesn't matter, it's all done, maintained and portable to the platforms most people care about, so you can write all the fun parts of the engine yourself.

As far as I'm concerned, those are the fun parts of the engine, but whatever.
45  Developer / Technical / Re: The happy programmer room on: September 20, 2013, 04:16:57 AM
what's the deal that makes it so much better? new interface?
Hardware accelerated, logical rendering sizes (ie naturally scaling resolutions), rotation and scaling support without "extra crap", unicode text input, touch support for devices that swing that way, fullscreen apps without fullscreen mode in windows (no more "fucked" resolution on a crash!), key input that isn't locale dependent...

I had to go over this post and the entire SDL 2 conversation several times trying to figure out if it was serious or an elaborate sarcastic joke.

Touch stuff aside, these are features I would have expected circa 1998.  None of these things are particularly difficult to do.  Was SDL really that primitve?
Pages: 1 2 [3] 4 5 ... 88
Theme orange-lt created by panic