Just curious. Hehe, I was thinking about this the other day and now I'm wondering what all you fellow coders out there have done. So what's the HARDEST most complicated program you've written? It doesn't have to be efficient, heck, it can all be spaghetti code.

The hardest thing I've coded was a DOS text editor written all in assembly. Parts of it were in Turbo Pascal 7.0, but it was used to call assembly libraries.

The second was a program, also written in assembly language and pascal that converted a text file to an EXE file, encrypted it, and password protected it (it had a login interface). It had some weird features like playing a song (an actual WAV sample) through the PC speaker while controlling the LEDs in the CD-ROM drive, Floppy, and Scroll/Caps/Number Lock (It made them flash like Christmas lights).

The shortest program I've ever written compiled to two bytes. Yes, two bytes. If anyone can beat that, let me know because there is only 1 program in the world that can have a size like that. =) Anyone care to guess what it did?

Recommended Answers

All 77 Replies

2 bytes? Let me guess ... it restarted the computer? I remember you telling me once it did something like that.

Haha you gave yourself away. I knew I remembered seeing it somewhere. I did a search on techtalk for "assembly" and came up with this post that you wrote talking about that 2 byte program.

[thread]140[/thread] and it's the 4th post down.

Doh. I knew I told you, but I was hoping you didn't give it away. :shock:

You never wrote what the hardest program you wrote was. :shock:

Hmm ... that's cuz I can't think of one. Possibly the Unix-based file manager I wrote in C this past semester for Mini-Krish. (It makes it a lot harder when you don't know C at all and the professor gives you no help.) I anticipate the file server queue I have yet to write for this guy to be tough too (hopefully not though!)

I'm also very proud of the Dictionary ADT (hash table) I wrote for CSC120 with Kamberova ... some of the stuff I did in Liang's class with QT was a lot of hard work too.

Probably the most complicated stuff I've done is work with the back-end of this damn forum software ;) It's my first endeavor with PHP and I sorta jumped into this complex proggie consisting of 200+ php files.

EDIT: After thinking about it, I decided that this phpBB forum software isn't hard, it's just long and tedious :o

Well that is a tough one.... let me see. I have two actually.

One is a program we had to write in school that simulate the different CPU alogorithms, and we had a choice of any language. Sounds like a dream...it wasn't. It was extremely tough, since we also had to display results, and show a graph. I decided to go the VBA route in good old Access 2000.

The second most difficult was probably the first C++ program I ever had to create, which was an actual functioning Tax Calculator. First exposure to C++ was definitely a downer. :-)

Restarting the computer would be smaller than a NOP?

Restarting the computer would be smaller than a NOP?

Yes it would be smaller by a few bytes. Because even if you have a NOP, you would still need code to exit the program, which would add a few bytes more. When you restart the computer, you don't need to exit because you don't need any user input right after it reboots.

I believe that it only works in older machines though. I only tried it on a Windows 95 machine, in DOS.

Files manager sounds interesting.. but my hardest was a .DOC to .HTML conversion program in PERL.

Restarting the computer would be smaller than a NOP?

What's a NOP?

NOP = No OPeration. A program, procedure, process, line of code that does nothing. Stub functions are NOPs.

Hardest? The one I'm working on right now... which isn't necessarily hard, just boring and time consuming.

A 2-tier client/server app in VB.NET with SQL Server support. It's a distributed app for my dork roomies and their RPGs. We have a LAN, so they want an distributed app to completely eliminate the paper and pencil aspect of their roleplaying games.

So... functional player sheets and dice rollers on teh clients, with the server having full access to the info and the ability to change info (the server is the GM's computer, obv.)... basic interface is done. I have the clients talking to server, and server talking to DB.

Once I got basic functionality done, and communications between client-server-db, I started fooling with making little openGL animations for 3-d dice rolling, hoping to stick them in a box somewhere in a VB window.

It's a huge, uncommented, hog of a program.. and damn messy. I think i may give up soon. Just getting the thing talking to it's different components took out my oomph. i haven't even begun to create the business rules, or built the huge multi-table relational database.

Blah, programming is hard, yo.

:(

i made a c to f converter in spanish and in english, the spanish grammar was really hard.


but making chocolate chip cookies was the hardest for me, the source code was all wrong

hehe :) C to F as in celcius to farenheit? ;)

I have not seen such a senseless post in a long time. ;)

Oh shut up you. :P (There, an even more senseless post.)

the HARDEST program i ever made was actually, a password tumbler insorts ... i wrote it my friends gave it life .. this was done back in the day while i was ohh 13-14 with c and or C++ and or basic (i think it was basic i cant remember) i was learning back then.. oh those days.. so long ago...... but yeah after i learned more (cant say that i fully know) it just gets better .. nothing to difficult im more hardware than software thats what i got my friends for..

I'm an 'oldster' compared to you guys... :lol:

I can't recall the toughest program I've written from scratch - most of the stuff one works upon in my genre (Mainframes) deals with code maintenance, not writing new code. Actually, writing new code from scratch is almost always FAR simpler than doing maintenance on someone else's (potentially horribly written) code... so I'll list a couple of the toughest I've worked upon - it's a two way tie.

One was an Assembler program with CICS and IMS interfaces, which was intentionally written in the most cryptic fashion possible. It was written by a contract programmer who ENSURED their job security - no-one else even wanted to TRY to understand the thing. After tearing the entire thing apart line by line, I was laughing as I told my manager that the thing was (with the exception of the name of the program being 1 character different) an EXACT replica of another program in the system!! :lol: The company had paid the guy who-knows-how-long to maintain a purposely redundant program.

The other toughie was a copybook subroutine in an EDI system which validated the sequencing of EDI segments within documents. The number of possibilities the thing had to account for was horriffic. Talk about having to be able to think on many differing tangents at once...

:cool: A.M.

hardest? been thrown an assignment to be done in assembly code, when the lecturer didn't explain very well how to write assembly code...I was so frustrated...this probably sounds simple to everyone else but hey i'm a newbie :lol:

I had a couple of really hard assignments last year at school, one was to write a process scheduling program to simulate CPU load under different CPU scheduling algorithms, while at the same time I wrote a multiplayer card game, both client and server (was supposed to be a group project, but I wrote 99% percent of the client, and the prof was supposed to give us the server, but his didn't work, so I rewrote to work properly) was a very busy couple of weeks :)

a metacircular interpreter in scheme. its not that scheme is a problem (i rather like it actually) but it was made a pain in all of our asses by the professor in that class and his cryptic specifications...

wow. 2 bytes....post code for us? :)

or at least me. i have no idea how you did that. lol

wow. 2 bytes....post code for us? :)

or at least me. i have no idea how you did that. lol

All it was was a call to int 19h (I think it was 19h). There was no need to put code to exit the program because it rebooted the computer, thus no exit code needed. I did it using debug.exe creating a COM file. I don't know if would work in W2K though. Never tried it.

*understanding dawns*

aaah. clever :)

Tell you what, the hardest program I wrote was as an intern. The problem wasn't the program itself - my lady-boss (no offence ladies .... ) had probably missed her therapy session or soemthing, so she almost sacked me over the colour coordination of the graphs in Excel!! [It was a Visula Basic for Applications program - if you can call it a program...lol]

Problem with her was that - she wanted things done 'the proper way' and not as I like to do them 'the way it works'.

Hardest program ever was a realtime-embedded system with a 8051 microcontroller, that had to shoot away metal balls from a rail, and let the non-reflective pass.
The problem wasn't the programming or the design, but the problem was the timing. The rail on whitch the balls roll down wasn't perfect flat. There where tiny bumps in it, and that way I had to compensate the time by try & error... And you had to watch out NOT to touch the wires connected with the microcontroller, otherwise you could fire an event or interrupt accidental.

I'm glad I got that thing working after all!

Until recently, my hardest was for General Motors in the 1980's. I was with the "Supplemental Unemployment Benefits" team (yes, exactly what it sounds like - a giant COBOL system supported by a small army of developers all focused on the dubious task of paying people - who aren't working). Long story short, the challenge was navigating the mine field of negotiators, lawyers, and the unions (with negotiators and lawyers). Among other things, that job taught me to stop wondering why cars are so expensive. ;-)

That was unseated recently.

A few years ago, I left AT&T to create the Internet's "next big thing"... a new way to communicate with an audience online that improves on the best features of email, the web and instant messaging and avoids the mistakes that led to things like spam, viruses, forgotten bookmarks, "server unavailable", size limitations and html.

My single program is the Viewer ("browser"), the Library ("search engine"), the Builder (for the new kind of content) and the publisher - with a unique licensing mechanism (since not everyone wants to give away all their content), a 3-level "bookmarking" construct that lets the viewer decide what content is automatically delivered to their PC and it requires no new server to be installed anywhere.

Besides the many "under the hood" challenges, balancing the needs of the Author(publisher) and the needs of the Viewer(user) has been "hard." And very rewarding.
It's one thing to create something like html that's so "hard" that it's only for "computer people". It's another thing to make something that's for everyone else too.

Dan

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.