In answer to the title question, sure - I've posted VB.NET code on these very forums. [looksaround] [lol]
Seriously, though, I guess it raises some questions (not necessarily flaws) inherent in the free software movement. Sure, bad source code is orders of magnitude more useful than binary, but is the end user supposed to be able to alter it, or take snippets from the guts of the thing, or take the greater architecture of the program and do something useful with it? To fulfil Stallman's grand philosophical agenda, should we be refactoring the shit out of our code, and providing full written documentation, use case scenarios, UML and pseudocode? (please don't make me write pseudocode for a hobby project >_>)
It occurs to me that the vast majority of end-users aren't even so much as "technically-minded", let alone capable of interpreting and altering an algorithm in formal syntax - the source code is every bit as much a black box to them as the binary executable, really. So, in the same way as those guys who can go into megabyte-scale executables and hack in new functionality seem a tightly-knit clique of esoteric low-level superprogrammers to the rest of us, we're a pretty small demographic of whiz-bang geniuses to the rest of the population.
On that last note, the FSF, et al, appear to aim for a practical outcome, where those with the skills of the profession can do access, understand and alter the code - and we are better off for it. I'm probably ignoring the legal thrust of the free software movement, too, which is probably largely more significant than the source code itself.
So, I guess the criteria is, anything's better than proprietary DRM-laden capitalist binary. >_>
Would you release bad code?
Quote: Original post by Mithrandir
Absolutely terrible open source code??
You act like that's a rarity...
The closed source code I've seen so far is often worse, so what (publicly available examples: most of liberated ex-proprietary games, daily wtf).
But then, I guess it's too easy for you to troll around on those not cowering behind walls like you, so my conjecture (until you prove otherwise) is that your code is worth many daily wtfs.
[Edited by - phresnel on October 27, 2009 8:53:26 AM]
Quote: Original post by phresnelQuote: Original post by Mithrandir
Absolutely terrible open source code??
You act like that's a rarity...
The closed source code I've seen so far is often worse, so what (publicly available examples: most of liberated ex-proprietary games, daily wtf).
But then, I guess it's too easy for you to troll around on those not cowering behind walls like you, so my conjecture (until you prove otherwise) is that your code is worth many daily wtfs.
++
I have yet to work on a commercial, closed source program that is not full of ugly hacks and spaghetti code. Obviously, not every closed-program is ugly code, but it seems to be the norm, with the worst offenders being "line-of-business" applications, developed by one or two people under tight deadlines (you know, like 90% of the software written out there).
In my experience, projects developed in the open are far more likely to employ proper code review practices than closed-source projects. (Obviously, that's not universal - however code reviews are an established practice in all "high-profile" open-source projects. Check any mailing lists you like, it's there).
Edit: back on topic, there's little reason to *not* release your "embarrassing" source. The worst that could happen is someone taking a look at it and liking it - you are not worse of than before. However, someone might look at it and send you a patch - you have gained something for nothing.
[OpenTK: C# OpenGL 4.4, OpenGL ES 3.0 and OpenAL 1.1. Now with Linux/KMS support!]
If it was meant to be used specificaly for education then maybe perfection would be worth persuing.
I take pride in my messy code developed using archaic techniques that no one in their right mind should use and I post code updates to my site every chance I get. The only time I won't post a code update is if it breaks something. I am done caring about what others think about my technology choices and techniques for projects that they have no stake in. A "real" programmer enjoys and has a passion for what he does. He has to stop himself from coding because he really should be going to bed but just wants to finish that one last feature. This year I am taking back that enjoyment, that pride, that passion for myself.
(/insane ranting)
I take pride in my messy code developed using archaic techniques that no one in their right mind should use and I post code updates to my site every chance I get. The only time I won't post a code update is if it breaks something. I am done caring about what others think about my technology choices and techniques for projects that they have no stake in. A "real" programmer enjoys and has a passion for what he does. He has to stop himself from coding because he really should be going to bed but just wants to finish that one last feature. This year I am taking back that enjoyment, that pride, that passion for myself.
(/insane ranting)
I just worked my ass off this weekend to finish a programming assignment which was due today. I was up till 6am and hacking at it. I had little planning going into it and I think it caused me to waste time and deliver a crappy product.
I've been a big vocal supporter of software engineering and design but never been a big practitioner of it. I'm starting to think that it's better to debug engineering mistakes at the design and conception phase than once it's been coded and produced. It's just so tempting to just start writing code :-/ ... but the result is inferior production on more time and less sleep.
If your program is built the same way and you want to open source it, it might be useful to spend a day or two on reorganizing, compartmentalizing and documenting it. After all, if you've spent the past year writing it, what's a day or two gonna matter? The benefit would be that other people can more clearly understand how your program works and you also see some of the bad design flaws you made (and would have otherwise overlooked).
I've been a big vocal supporter of software engineering and design but never been a big practitioner of it. I'm starting to think that it's better to debug engineering mistakes at the design and conception phase than once it's been coded and produced. It's just so tempting to just start writing code :-/ ... but the result is inferior production on more time and less sleep.
If your program is built the same way and you want to open source it, it might be useful to spend a day or two on reorganizing, compartmentalizing and documenting it. After all, if you've spent the past year writing it, what's a day or two gonna matter? The benefit would be that other people can more clearly understand how your program works and you also see some of the bad design flaws you made (and would have otherwise overlooked).
Eric Nevala
Indie Developer | Spellbound | Dev blog | Twitter | Unreal Engine 4
Quote: Original post by slayemin
I've been a big vocal supporter of software engineering and design but never been a big practitioner of it. I'm starting to think that it's better to debug engineering mistakes at the design and conception phase than once it's been coded and produced. It's just so tempting to just start writing code :-/ ... but the result is inferior production on more time and less sleep.
Just my observation: planning definitely helps, but you are never going to get it 100% right in the planning phase. Don't be afraid to return to drawing board when you see your plans collapse in the coding phase.
Quote: Original post by slayemin
After all, if you've spent the past year writing it, what's a day or two gonna matter?
If you've written a program for the past year, one or two days of documentation and cleaning up are not going to matter. But not in the same way that you meant :P. The program could be already so huge that cleaning up and documentation could take significantly more time to be of any use.
Quote: Original post by Chris Reynolds
Recently, I've been in a fury trying to do as much work on my game as possible before I lose the free-time I currently have. As I near completion of the first release, I started thinking about going open-source.
But then I realized my code, which has been written over the past year, would be so completely embarrassing for any "real" programmer to see that I don't know if I could ever release it. And beyond that, if any beginner programmer were to reference the code for learning things like networking, physics, etc. they would be lead into a whirlpool of hack-arounds, redundancies, and random comments I write when I'm high.
I'm self taught, so I'm too lazy and uneducated to restructure the game. But I believe the game has some innovative gameplay that might warrant the release of the code.
So what would you do? Have you ever released code you were embarrassed by? Would you?
There are tools such as 'code beautifiers' (Google it) to make your code look better (formatting, renaming), but it won't fix a bad
implementation or algorithm for you. ;)
Quote: Original post by Chris ReynoldsQuote: Original post by Platinum314
have put it off because too much is dependent on what is already there. There's also some weird orphaned code that I keep thinking I am going to use later.
These are largely my problems. Bad solutions to problems that I initially intend to be temporary, but end up keeping because eventually too many things become dependent on them for me to rewrite the solution.
As to what comments I make when I'm high? When I'm trying to solve problems, I tend to "think outloud" in the form of comments, and I never delete them.. so mostly irrelevant rubbish
It sounds to me that this is a good time for you to dive into UML.
Quote:
So what would you do?
Nothing much, except not releasing it as OS yet
Quote:
Have you ever released code you were embarrassed by?
I made a project of mine open source about 10 years ago. Lets just say I could have saved me the troubble.
Most of the time, at least these days, I spend my time repairing other peoples misserable code and havoced projects. Its amazing what you will find out there, specially among source that is not open.
Quote:
Would you?
I would have to say no
Quote: Recently, I've been in a fury trying to do as much work on my game as possible before I lose the free-time I currently have. As I near completion of the first release, I started thinking about going open-source.
But then I realized my code, which has been written over the past year, would be so completely embarrassing for any "real" programmer to see that I don't know if I could ever release it. And beyond that, if any beginner programmer were to reference the code for learning things like networking, physics, etc. they would be lead into a whirlpool of hack-arounds, redundancies, and random comments I write when I'm high.
I'm self taught, so I'm too lazy and uneducated to restructure the game. But I believe the game has some innovative gameplay that might warrant the release of the code.
So what would you do? Have you ever released code you were embarrassed by? Would you?
No sane beginner would try to gain insight from some random open source code, especially if the project is not mature. If they don't get confused by your code, they will get confused by some other guys code, especially if all they do is copy-paste and pray.
And if that's their education strategy then they deserve the outcome.
If you want to make it open source that's up to you. All of my projects are open source, no matter how small, crappy, or badly documented--At this point all of my projects have these things in ernest.
Hell, even my answers to the Euler problems are open source. I don't do it for any other reason than to gain free offsite SVN support. If anyone wants to look at my code, they're more than welcome, and I try my best to make it presentable and well designed. But it should be taken for what it is: Some random guy's code on a free subversion hosting site.
That said, if you feel that you could have done a better job, then my suggestion would be to start rewriting it when you have a chance--because that nagging feeling in the back of your head will -never- go away. Either that or start a bigger better project to make you completely forget about this one.
P.S. If you want to write better code then my suggestion would be to look into test driven development: http://www.ddj.com/cpp/184401572
I also always write out an algorithm, library, or unit test I have in mind in a word document before I code it--even if I'm 100% certain I know how to write it. You'd be surprised of the things that come up when you're not just trying to get your code to work.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement