# Your Epic Programming Experiences



## Kreij (Jan 23, 2010)

While reading other threads here on TPU I was waxing nostalgic about some of my programming experiences. Not the code itself, but the outcome or the experience after doing the code, so I though I would start a thread.

What experiences have you had with you code?
Epic Success?
Epic Failure?
Epic Humor?

Pro coders, students, hobbyists?  All are welcome to post.
Usually your early coding experience are the best when you were/are still wet behind the ears. We've all been there. We've all laughed, cried, or took a hostage over something.

Bring it on, and let's all share out greatest moments. 

Here is my first impression of coding...

In high school we wrote programs that were saved on punch tape. Other students in the class were sabotaging other peoples programs by cutting little parts out of their tape roll if they left it out. I kept my tape rolls on me personally (in a pocket) so no one could rip or cut them and thought, "This programming stuff is cut-throat, I better be careful".


----------



## Disparia (Jan 23, 2010)

I once threw an exception so fatal that the Matrix needed to be restarted...


----------



## Kreij (Jan 23, 2010)

Jizzler said:


> I once threw an exception so fatal that the Matrix needed to be restarted...



 Good one Jiz.

When I was working in the Software Assurance department in the MRI division at GE, they found out I could code (I was a technician, not a programmer) and they asked me to write a software bug report database app ... in Pascal. 

It worked perfectly until they caused so much feature creep that I would have had to rewrite the whole database infrastructure. I told them to go and buy a commercial DBMS.
They bought one, but were never quite as happy with it. lol


----------



## Disparia (Jan 23, 2010)

My feature creep story is epic in the sense that the end result was the end of the entire company :shadedshu I warned them...


----------



## Kreij (Jan 23, 2010)

Jizzler said:


> My feature creep story is epic in the sense that the end result was the end of the entire company :shadedshu I warned them...



Care to elaborate? I, for one, would like to hear your story.
Feature creep is a never ending battle when working on home-grown applications for companies who do not have clear design requirements in mind when they want software. The ERP system I am writing at work is getting the feature creep treatment right now, and I am constantly having to recode and redesign database tables to facilitate new functionality.


----------



## Disparia (Jan 23, 2010)

Creep of the worse kind, a complete re-focusing of the project 

One of the directors had a clear, well-planned idea for the expansion of her division. After months of design and coding we a had good working beta and started some real world testing of the product. Right about this time the boss' daughter, fresh off a failed start-up of her own, was wanting something new to play with. She was given the entire project. Her new vision of the project was industry-related, but nothing more. We had to design and code a completely new system without the benefit of a clear goal like we had before. New ideas were brought up weekly, sometimes making the previous weeks work worthless.

The killer was that the entire IT team was put to task of fulfilling her whims, all the while the rest of the company was completely neglected, ultimately leading to it's demise. We pretty much "left the door open" to competitors.

Put in 125,000 lines of pretty tight code, if I do say so myself, but that doesn't amount to jack if no one is using it..


----------



## Oliver_FF (Jan 24, 2010)

I'm only 21 so haven't had much experience yet, although I have spent a year as an intern for Sun Microsystems as a dynamic web engineer. I'm in my final year at University.

Epic Success?
Last summer after my internship ended and before University started I got pretty bored, so decided I'd have a go at writing an Internet search engine. Everything from the ground up. Web crawler, databases, web interface (totally ajax, no page reloads), the whole lot. It was ambitious even for me. Still 3 weeks later, 650,000 websites crawled and a 4GB database I had what was something quite remarkable - a working Internet search engine that ran mainly in the clients browser with LOTS of ajax. The results were astonishingly accurate thanks to some keyword association which -automatically- deduced things like "space" relates to "science', 'astronomy', 'planets', 'moon', 'nasa', 'earth', 'stars"
(single keywords only mind!)


Epic Failure?
Shortly after creating the search engine, it transpired that JSP hosting was mega expensive. So I rewrote a lot of the AJAX stuff to PHP. Then it transpired that getting hosting for a 4GB database is nigh on impossible for a poor student. Oh well.


Epic Humor?
Last year I was writing some JSP code, building it in to a .WAR file and deploying the code to an application server. I added a new method to one of my classes, called it someplace else, compiled my code and deployed it out. I went to test this new code and got a runtime error along the lines of "method not found". Odd. I build it all again, still no compilation errors, deployed fine and got the same issue. Very suspicious. I then used java reflection to load the class definition at runtime and inspect it's methods - the method was found and it let me call it. Very very suspicious. So directly calling this method gave an error, but indirectly calling it via reflection worked fine. In the end it turned out that there was a rogue compiled java file floating around containing an old class definition. The java class loader was loading two different definitions for my class which resulted in one way working and the other way not working.


----------



## Kreij (Jan 24, 2010)

@Oliver
Epic Success? : I was going to try your SE, but it won't let me in becuase I use IE8. lol
Epic Fail : Year, you would probably be better off setting up your own hosting server.
Epic Humor : Darn those rogue java file !!


----------



## Oliver_FF (Jan 24, 2010)

Kreij said:


> @Oliver
> Epic Success? : I was going to try your SE, but it won't let me in becuase I use IE8. lol
> Epic Fail : Year, you would probably be better off setting up your own hosting server.
> Epic Humor : Darn those rogue java file !!



IE8 is a heap of s**t, especially in the mind of web engineers. I could enable IE8, but it'd look beyond terrible as IE seems to totally disregard some of the more important styles which hold together the result display. The search results are displayed as a map rather than a list - buildings on a map, to be specific. You start in the center of this map with large buildings and as the search results get less related to your query the buildings get smaller. The map scrolls up/down/left/right as you click on the borders allowing you to pan across these cities that represent your search results. IE seems to ignore the stuff that says "each cell is 80x80 pixels and consists of 4 blocks". It's unusable.

Works great in any other browser lol


----------



## Kreij (Jan 24, 2010)

Yes, there is much angst in the web development community about MS browsers. Not just the fact that it's non-complient, but the fact that you have to handle each of the different versions (6, 7, 8) differently. Unfortunately for the devs, there are a jillion people still using all three version and it leaves them little recourse other than to suck it up and write the code to handle it.

Someone suggested that MS force bworser updates through their update service, but that could be disasterous for companies with intranet based sites, where all or most of the employees are still deployed with IE6 (or whatever).


----------



## Ross211 (Jan 25, 2010)

*Console Database*

I am currently a college student working in a local video game store.  Yes we buy / sell / trade video games (It is horrible, I can't open this can of worms right now) Anyways, the most practical program I have ever written was for our store.  It keeps track of any game console's serial numbers you specify.  It didn't take me long to write, but I enjoyed it quite a bit.

Here it is - http://members.cox.net/rossmartin2/Console Database.rar

It is written in Visual Basic using Visual Studio 2008.  I spent a couple days at work writing this program.  The data is basically read from simple comma delimited text files, thrown into an array of objects, and shown to the user in a listbox.  The user then has the ability to add an entry to a specified console, backup the whole program to a specified directory, add a new console, etc...

  I created a custom class for the array, and each element in the array's index consists of these variables -

    Public systemSerial As String
    Public boughtFrom As String
    Public tradeDate As String
    Public employee As String

This program is one of the few programs I have implemented OOP into.  I hope this program can maybe help someone in some way.  If anyone is interested in the whole code after this post, I will gladly post it.  

/edit

This is my first post here, I've been hiding out in this forum.  Thanks to this forum I have some more tricks up my sleeve :~]


----------



## Yukikaze (Jan 25, 2010)

Epic Success 1: From a zero background in image processing and OpenCL programming, writing an OpenCL implementation of a Bilateral Filter for a university project in three days. Sleep was not included, despair was.

Epic Success 2: From a zero background in web programming, managing to write an online browser game not too unsimilar to Travian by using JBOSS Seam. Half the team coded (Me and a friend of mine), the other half (A guy and a girl taking the course with us) spent three weeks getting Seam running before that. Man, that thing was way over our heads and way over what was needed for this project, but our lecturer was adamant we use it. We somehow pulled it off for a perfect 100/100 grade.

Epic Failure: Coding a silly embedded device for an Embedded Systems course....while on vacation in Paris - Remoting to the home rig from my laptop. Ugh. The delay was caused by Epic Success 2.

Epic Humor: This isn't mine, but the idea is just to hilarious (not to mention evil, evil, evil) not to post...


```
#ifndef CFDC_H
#define CFDC_H

#include <cstdlib>
#include <exception.h>

#define return if (std::random(1000) < 2) throw std::exception(); else return

//Happy Debugging !

#endif
```

This is from one of the stories posted in ithappens.ru, you need to know Russian to read that great site, though. Strangely enough, no funny/epic stories from work yet, but I suspect some are going to show up eventually, I'm still young


----------



## Kreij (Jan 25, 2010)

@Ross211 : Welcome to TPU  Glad you are getting ideas and tips from the P&W section. If you ever need assistance there are many here that are always willing to help.

@Yuki : That code snippet is great. I'll have to remember that in case I need it in the future


----------



## Solaris17 (Jan 25, 2010)

well i dont dable enough in most languages to have any really great stories like you guys. when i do most things like php or mysql etc i play it safe enoug to not have alot of errors or simple ones. however when it comes to my disk i have a few

Epic Success:
Well my latest was the final release of the multiple versions of my disk. It took me forever to UL and i had multiple FTP problems with my home connection uploading the multiple versions so it was a miracle in itself that i released it on time. 


Epic Failure:

wow many but i have to say my biggest one had to be one of my compiles. i was implimenting the newest ubunu into m ISO and setting up all the linkage so that when at the main menu it would execute. so it takes like 15min to compile an image. and an image must be compiled you cant run it live. so it took my about 6 hours and GB upon GB (8GB iso) of random iso's trying to get ubuntu to work. (it took GB because im lazy and fail to delete the non working iso's so my recycle bin just gets monsterous) the problem in question was when i tried to boot ubuntu the system would freeze and eventually reboot. i found it really odd because it used to just throw me an error explaining why it couldnt work. well. after a bunch of tries and some coffee i realized that i had accidentaly added the reboot line to the ubuntu init line. after fixing that it told me that it couldnt find the filesystem..so i go back and i found nothing wrong. needless to say it all came down to a "/" was missing. after that it worked fine.


Epic Humor:
not really code related but when i was in school we used to play with the "netsend" command as a cheap IM to talk to people in other classes or to each other. Well i told one girl what the command was and i forgot totally to include that she needed to specify a PC. so instead of oing like netsend /server/room number/pc number she simply did HD (our district) well the person she intended did infact get the message however so did the entire school district the super intendant called our class to say hi to her. shortly their after the netsend command was disabled


----------



## FordGT90Concept (Jan 25, 2010)

Epic Success:

1) Fallout 3 Save Editor - It is my most downloaded app and it works thanks to #2.  Not really my favorite app but it works and people apparently like it so, meh.

2) Find/Replace - I first coded that back in 2004 or 2005 on VB because the .NET Framework is quite limited in terms of searching byte arrays for instances of another byte array.  I later converted it to C# and have used it countless times since.  It works great for solving word searches and can even do the unheard of "3D word search" .  I coded multiple variations of the linear search to work inside of a memory buffer or do a buffered search inside of a file.  It is very efficient because of how it checks for a match.

3) JbnLib.dll for Nightfire Workshop.  In terms of third party assists for a game, it doesn't get much more extensive than that.  I, with the aide of a few others, reverse-engineered 12 file formats (multiple versions for several of them for Nightfire, Quake, Quake 2, Half-Life, and Half-Life 2) and authored wrappers for 6 applications.  I did all the coding and, if memory serves, there is in excess of 38,000 lines of code in that one DLL.  It is sheer madness what we accomplished there.


Epic Failure:

1) Giving up on solving the Zodiac Ciphers.

2) Still haven't got all the features I want to get into my Reminder app (hasn't been made public yet--might never be).

3) Trying to follow the source code for zlib.


Epic Humor (not really):

1) I was kicking myself for at least half a day trying to figure out why PHP wouldn't run a script of mine.  After much furstration and toil, it turned out an opening bracket was missing.

2) Can't forget all the times I was trying to use unmanaged code from C# only to discover that the C# app must be x86 if the DLL is x86 (happened again today, in fact).


----------



## Kreij (Jan 25, 2010)

@ Ford : Did you ever hear back from Berkley PD?

What's the reminder app?


----------



## FordGT90Concept (Jan 25, 2010)

Kreij said:


> @ Ford : Did you ever hear back from Berkley PD?
> 
> What's the reminder app?


Nope.  It was Vallejo PD, by the way.  In a nutshell, I learned more about the case and discovered it smells (of corruption, of half-truths, of lies, of deception).  The only way it could be solved is through unrestricted access to all police and federal files on all the killings of the area at the time.  That will never happen, for anyone.  Because of that, the case will remain unsolvable.

I am convinced that the ciphers are inconsequential (they would never get a conviction in court).


Instead of being a clock where every event is based on a specific time, every event works more like a countdown timer (e.g. timers used for cooking).  For example, I need to fill my prescriptions every 30 days, not 31, 28, or 29 days so from the moment I tell it I filled my prescriptions, it moves the next date/time to 30 days away from now.  The same applies to most medications (take every 6 hours).  If I don't want to be disturbed for x amount of time (sleeping or busy doing something I'm not about to pull away from), I simply delay all of them or which ever I need to.  It sounds an alarm every x number of seconds (I have it set to 60 at the moment) to remind you of expired events.

I made it originally back in late 2006.  This is version 2 and in it's 29th minor revision.  The timeline in version two has the potential for variable precision (milliseconds, seconds, minutes, hours, days, months, years)--a most useless feature (not a typo XD).

One verison or another has been running on my server since Feb 2007.  The primary objective of it was to remind me to take my drugs and it has worked vastly decreasing the amount of time I spend in the ER, operating room, and outpatient rooms at the hospital. 

Oh, it also changes tray icons to tell you if the sun is out (calculates sunrises and sunsets). XD 

It was the first application I did with a custom collection.  It's a mess and needs to be recoded from the ground up as version 3.  About the only thing recyclable from it is the sunrise/sunset stuff.  One thing I need to add is the ability to make an alarm absolute instead of relative.  For example, set it to always go off on Sundays at 7 PM.  It is relative now so if you didn't tell it that it was complete until 7:01 PM, next week's would be at 7:01 PM instead of 7 PM.


----------



## dcf-joe (Jan 27, 2010)

Right now, I am taking a second semester class in C++ and am starting to learn about objects and classes. As an exercise, our instructor made us model the planet earth with UML and make it into a class. Then, we had to "create" the planet again in our int main()'s


----------



## Clement (Feb 15, 2010)

Kreij said:


> Good one Jiz.
> 
> When I was working in the Software Assurance department in the MRI division at GE, they found out I could code (I was a technician, not a programmer) and they asked me to write a software bug report database app ... in Pascal.
> 
> ...



Oh my god, so many good memories!!!

I started as a technician in a Penn State laboratory out of high school (They found out I could program when I automated much of my daily data collection). Two years later I was promoted to 'research technologist'. Don't ask, .

Epic success: (The jist of a 3 year 'feature creep' project)

DDWR (Data driven weather reports...so unique!...)
It simply interfaced with a weather collecting station via fiber optics and watched for certain patterns, created reports, archived data, etc. Eventually I created a web server within it and every department had their own sections to download pertinent patterns/sets of data for their reports. It automated many previously tedious tasks. I also had many opportunities to analyze many many years worth of weather patterns for my own enjoyment.

Epic fail: I don't use ANY of those Visual Basic skills anymore 

Many of the programs that followed were VB front ends to C++ dll's on top of managed DBs (some my own, others not). I liked how fast I could churn out full blown apps by myself.

Epic Humor: I once wrote an entire PHP bulletin board that was designed from the ground up to be completely secure, and encrypted. Beta tested it myself, and even tried hacking it for quite some time. Afterwords, it was disregarded and never deployed! I had moved onto much more important things not to be discussed here.

Oh, I miss those days, I do!!! ...


----------



## PVTCaboose1337 (Feb 15, 2010)

Programming experience?  Funny?!?

Epic Humor:

Of course I have made some very funny programs.  See?







Yeah I know...  I refuse to release it to THEM.  It is for my own personal use.  I made it when I was bored as a joke.  If you get it you get it, if not, lurk more.

Epic Fail:

Ahh way back when I was learning I was learning about infinite loops.  I made a print command with an infinite loop to the printer in the computer lab.  I emptied all the trays, 2000 (ok many less, but still) sheets of paper wasted.  Teacher was pissed.  I could not stop the program.

Epic Success:

Many, the most recent was the easy msgr thing I made...  very nice if I do say so myself!

http://forums.techpowerup.com/showthread.php?t=113451


----------



## Clement (Feb 15, 2010)

PVTCaboose1337 said:


> Programming experience?  Funny?!?
> 
> Of course I have made some very funny programs.  See?
> 
> ...


----------



## regexorcist (Feb 17, 2010)

Kreij said:


> What experiences have you had with you code?
> Epic Success?
> Epic Failure?
> Epic Humor?



Epic Success, there are 2
1.) replacing the 25+ year old "b" series cmos communication and controls
w/ 3 PCs, ISA interface cards and custom wire wrap micro-controller circuits.
(that project got me my current programming job)

2.) Replace the Warehouse Inventory Control module of our Financial system
w/ a .Net based custom VB program which automates many of the 
manual processes and eliminates various reports and paper receipts. 
(green material and time saving project)

Epic Failure...
Updated 100 records in an Oracle datase, but I did it from the back end
w/ pl/sql and left out a clause. 10 million records were modified 
Awful feeling in my stomach when the script took too long to finish
and I realised what happened. BACK-UPS are your friend!!  

Epic Humor...
A server had been moved in the LAN room and no one knew about it.
While everyone was scrambling to find the server, I made a mock
EBAY listing with a picture of our server and posted it 
(on an obscure web server) and floated the link to our secretary.
Everyone was up-in-arms until someone noticed the actual URL


----------



## Clement (Feb 17, 2010)

FordGT90Concept said:


> Nope.  It was Vallejo PD, by the way.  In a nutshell, I learned more about the case and discovered it smells (of corruption, of half-truths, of lies, of deception).  The only way it could be solved is through unrestricted access to all police and federal files on all the killings of the area at the time.  That will never happen, for anyone.  Because of that, the case will remain unsolvable.
> 
> I am convinced that the ciphers are inconsequential (they would never get a conviction in court).
> 
> ...



Excellent idea for a reminder app! No need to worry about your clock being out of sync! (among other benifits)


----------



## FordGT90Concept (Feb 18, 2010)

Heh, yeah.  The server it runs on is also a Windows Time Server (for a domain).  It should be accurate to within a few ms of NIST time standards.


----------



## ste2425 (Feb 22, 2010)

writing my very first program, a scale player, i asked about it on here actually, if you selected to play the scale accending it would play one note repeatedly, the text would move on but the note would be stuck in the loop. Took me litteraly weeks to figure it out. rather an epic failure


----------



## Clement (Feb 22, 2010)

ste2425 said:


> writing my very first program, a scale player, i asked about it on here actually, if you selected to play the scale accending it would play one note repeatedly, the text would move on but the note would be stuck in the loop. Took me litteraly weeks to figure it out. rather an epic failure



That is not a failure friend, that's called debugging


----------

