20

Just curious, I'm wondering what all you experienced programmers or newbies (like me) out there have done. So what's the HARDEST most complicated program you've written?

2
  • what a question.. and looking at below there is a wonderful trend emerging. Youth vs Experience.. :) Apr 18, 2009 at 16:43
  • Trying to hack adaptive systems
    – om471987
    Feb 1, 2013 at 11:02

20 Answers 20

36

The application I created in 2005/6 lets people create visualisations of their houses/cars etc painted in different colors. Now that can certainly be done in Photoshop, but there was much, much more to it.

Viresol output preview

2
  • 4
    It just happens to be the hardest I have written so far :) Not that it was too hard, but basically recreating a lot of Photoshop's capabilities was really hard for me. I was the one and only developer on that team and I was 19-20 years old. Layers, magic wand, color models, shading, textures, optimization for performance, and what you see is just one of 6 modules of the final product. Other modules would provide you with formulae for the color shades used in the project, or look up closest ones Apr 18, 2009 at 16:26
  • 4
    V.big job for a one man show... I'm impressed as a junior programmer myself
    – Aaron
    Apr 23, 2009 at 16:41
20

a compiler

1
  • 3
    Would love to hear more about it... Jun 8, 2009 at 21:01
17

The one I didn't want to, or have fun, writing.

10

I once had to write a compression algorithm that used BWT (Burrows Wheeler Transform) and there is a step in the algorithm where you have to create an HUGE matrix. I had issues with memory problems and speed because the matrix was so huge. Come to find out, there is a really simple algorithm that I could've used and avoided the matrix entirely.

I also had to write a simple operating system in ASM and that was pretty tricky.

2
  • I'm running into this issue right now, can you let me know how to go about this without creating a gigantic matrix?
    – SNyamathi
    Feb 6, 2013 at 2:26
  • Check out section 3.3.2 for a somewhat confusing explanation.. I had troulble finding something simpler: stanford.edu/class/cs262/notes/lecture5.pdf Feb 6, 2013 at 6:26
10

I once made a real-time multi-camera video processing software, doing motion detection and cumulative histographic magic, all on 33MHz processors and 640Mb of RAM. The hard part was making this go fast; copious amounts of hashing, bits-shifting, cheating, swearing and late nights with pizza and ephiphanies for about 4 years. Oh, and I did a version dealing with color as well. Oh, and a module that could see the difference between steam and white smoke in large rooms (like nuclear reactors, as it were). Hah, you just try it! You wouldn't find examples of such in any text-book. :)

1
  • 1
    cool stuff. sounds definitely hard. Apr 25, 2009 at 13:12
8

A library for solving Non-linear Partial Differenential Equations. We used it in a theoretical physics group to solve a non-linear adaptation of the Schrodinger equation that occurs in very special low temperature environments.

It was relatively easy to get a simple solver working but generalizing it and making it fast was a challenge.

It's currently open source on google code: fdtl

0
7

An application that compiled and ran on both - windows and mac with one codebase.

1
  • 4
    back in the 90's - which was without a common framework like WxWidgets
    – jim
    May 7, 2009 at 13:13
6

Anything to do with encryption and security is always 1000% harder than it appears!

2
  • Hey were can I find information on this subject with regards to programming?
    – Aaron
    Apr 18, 2009 at 14:45
  • 1
    That's because there are always people smarter than you out there, and if they want to oppose your work, then you have to win on effort.
    – Kzqai
    Jan 17, 2010 at 20:45
5

A general purpose modem driver for a flaky online service. It also had to support 30 types of modem (before Hayes modems). They all had different timing characteristics.

It had to be written in both 8086 and Z80 assembler for the CP/M and DOS versions of our products. I still have nightmares about a certain half-duplex modem...

4

Automation with COM, with execution across the Grid

4

A proprietary video-streaming class using the ffmpeg api - at the level of handling packets and displaying frames at the right time, syncing with the audio. Not as hard as some of the others listed, but it kicked my butt for many weeks!

1
  • +1 because I've battled with the same!
    – chrism1
    Apr 18, 2009 at 18:08
4

Probably a tie: a decision problem solver for sets using satisfiability modulo theories and a cooperative process scheduler in C/ASM that ran on top of a UNIX operating system. The first one was just plain hard -- it had never been done before using SMT and translating the highly-theoretical paper into an actual implementation in a different context was difficult. The second one involved digging to to OS data structures to understand them, then replacing bits and pieces to jump back and forth between functions in the program as if they were separately scheduled threads.

4
  • Could you reference to mentioned, related papers, materials? It's sounds interesting :). Sep 1, 2011 at 13:10
  • Maybe sources of program are somewhere available? Sep 1, 2011 at 13:10
  • 1
    @Grzegorz - it wasn't very successful. You might want to check out Cesare Tinelli's work (cs.uiowa.edu/~tinelli/index.html). It's possible that he's had a graduate student look into doing it right.
    – tvanfosson
    Sep 1, 2011 at 13:37
  • Thanks for references. I try to find researchers touching SMT, program analysis etc. topics. As well as code examples. Sep 1, 2011 at 17:13
3

a debugger

3

A vector graphics library I started writing in 1998 that made extensive use of hierarchical subdivision to provide many operations in O(log n) and anisotropic tesselations memoized in OpenGL display lists to maintain high frame rates on dynamic scenes. In particular, it could zoom into complicated vector graphics fluidly because it decomposed them into trees and culled them efficiently. For many years, it was by far the fastest consumer-level vector graphics renderer in the world.

The original version was 200kLOC of C++ but the theoretical problems that formed the foundation of its design took me 2 years to solve.

3

2 things:

1) A compiler. The name of the language was "3-balls" (tribute to a friend who had he's balls operated)

2) A Windows assembly program without a single macro, everything was pushed to the stack and the address were all relative. It works in all Windows (no address harcoded). Basically it's a simple window with some buttons & labels. But the nice thing is that, from the object and executable files, I extracted the opcodes and generated a shellcode from it. So I could exploit any buffer on a program and literally create my own application above the running one! Nice to show a screen on a remote computer, and the remote computer will execute a program that does not exist on his computer, you literaly sent the program to be executed to the remote computer.

Of course this is too much headcache for nothing... but it worth all bytes I typed!

1
  • 1
    the 3rd ball deserves a "plus one" for sure Dec 17, 2015 at 13:29
2

I've written several pieces of code that do modeling in multiple spatial dimensions (from 3 to as high as about 7 dimensions.) Problems become harder when you work on something that you cannot actually plot or even visualize.

But really, as one who has spent most of my time building toolkits for others to use in their work, I'd argue that the most complex programs I've done were actually toolboxes, sets of tools made to work with each other in a consistent way. Because they are all made to work together, you can argue that several dozen utilities actually work as in fact one single tool. (Of course, any modular code is similar in this respect.) Here too, what I provided were generally modeling tools, made to solve color management problems.

2

I was asked this very question in an interview a couple weeks ago (still haven't heard whether I got the job).

For me it was several assignments in my first programming class after the basic intro classes. It was the first time a course in Web Design was offered at my university. Since it was new, several graduating seniors signed up and comprised about half the class. The instructor was used to teaching senior-level classes, and already knew many of those in the class. Basically he taught it at their level, rather than for the other half of the class who were pretty inexperienced.

Probably the most difficult assignment was writing a text-only browser. I had problems with parsing for the various tags and asked for help. The instructor said, Well, if you'd had the Compilers course you could just write a simple one. At that point 'Compiler' was a black box that did magic things before the program ran. I didn't really know what it was, much less was I able to write one.

The thing that made it difficult was not having the tools necessary to do the work, to include understanding the results I got when I Googled. (Man pages and APIs are great if you already understand what you are looking for, but not for teaching a noob.) In my co-op experiences I've learned the most when I had a mentor who said, If you're stuck more than a couple hours, let me know so I can get you unstuck and moving along. Much better than those who don't want to hear from me except every week or so.

1

I'm working on Yet Another PHP Framework, which has been a fun journey thus far.

1

I am currently writing an iPhone application. It is most definitely the hardest program I've ever written. Not because the language is difficult, the code is difficult or any other reason, but because everything on the device has to be so fluent.

Everything has to look and feel natural. Since I'm a real programmer (with nil understanding of fluency, smoothness or design .. so it appears) this makes it really difficult for me. The program works, code wise, but user interface wise I have a much harder time getting things done.

Also threads suck ;-)

0

Nothing special, but a function that could draw a "sphere" with triangles, with n x n points and interpolated the triangles betweeen two colors (so the input was the radius, number of subdivisons, color1, color2). It was hard but very fun when it worked :)

Not the answer you're looking for? Browse other questions tagged or ask your own question.