Hacker News new | past | comments | ask | show | jobs | submit login
Ask HN: What's the most important piece of code you've written?
105 points by jessehorne 41 days ago | hide | past | web | favorite | 108 comments
What's the most important piece of code you've written?

My answer is as follows... The most important piece of code I've written was a rudimentary 2d tile engine in QB64 for an RPG I never finished. It's memorable and important to me because of what writing it did for my confidence as a developer. At the time, writing a tile engine "from scratch", in my mind, would make me a "professional".

I had been following a Game Development YouTube series called "Adventures In Game Development". I wanted to be a game developer! It was my dream! I was a novice developer when I took on that challenge. After a few articles and discussions with some people in various IRC channels, I began.

A few hours later, I saw a map appear that I had hardcoded which contained 0's, 1's. When I saw the square patch of grass with water in the middle (my clever map design), I thought I could accomplish anything. It was one of those moments that changed my life.

I'm not kidding when I say I had wanted to write a tile engine for a year, at least, before I was actually able to do it. I was probably around 14 years old, at the time.

I hope you enjoyed reading my answer to this question and I look forward to reading yours!

EDIT

I found the link to one of the articles I read when writing the tile engine.

http://www.petesqbsite.com/sections/tutorials/tutorials/rpg_tut2.txt

EDIT 2

Another important piece of code I've written was the prototype for this game.

http://hdfgame.com/

I helped with the commercial version a bit but it was awesome to see my prototype turn into the first commercial game that I helped release. The prototype was simple but it had the basic functionality that Hexapod Defense Force has.




This isn’t the most important thing I’ve done, but it’s certainly one of the coolest. And it was important to millions of Starcraft players.

There was a time when we broke patching for Starcraft. I point no fingers because, of the top 4 engineers that worked on Battle.net from the beginning until the point of this incident, 3 of them (myself included) broke patching (Diablo, Warcraft II BNE (my bad), and now Starcraft). This is a tragedy, because we always took the mechanics of it very seriously, and still would get it wrong.

A patch went out that broke the patching mechanism. Starcraft worked fine, but if you had to download another patch, the game would crash. We were looking at a scenario where everyone would have to reinstall the game, and that sucks. Worse, this was back in the early 2000s, so we had no way to message everyone easily.

I spent two days non-stop trying to find a way out. And then I had a crazy brilliant idea, based on the original bug. See, the crash bug was a stack overwrite, causing the version detection code to crash inside the game when returning from the version check. I figured out a way to cause another stack overwrite to fix the first one; use the downloadable version DLL we used at the time to leave a trampoline on the stack that would be right at the stack overflow caused by the bug, and cause the game to jump straight to the download-next-patch section of the code. It took a little while to get everything to work properly, but it was glorious. We made a small patch to fix the bug, and used my stack-overwrite hack to get the game to download it. And then I went and got some sleep.

After this, we (Blizzard) overhauled how we did patch testing, and stopped breaking patching.


Kerrigan would be pleased.


That is so interesting, what a cool fix.


It really depends on what you mean by important? Some of my most important code saves a company millions of dollars a year... It's not at all important to me, but it does it's job and it is important to someone.

The most important code to me is a difficult question... I look at code as solutions to problem. What's most important to me, is the code that made me realize none of us are free (weird as that sounds). I can track anyone on the web from their discussions (provided enough comments, i.e. 1000+ words):

https://twitter.com/AustinGWalters/status/104189476543920128...

Expanding on this system I built an investment framework part of which is incorporated in (https://projectpiglet.com). It has helped me make 100% yoy returns since 2013 (including >200% last year, even with the downturn):

https://twitter.com/AustinGWalters/status/107014266501716787...

It's the basis for my startup, but perhaps more importantly, made me realize we have no freedom. I can do this with no funds, in my house, with a computer. I track a couple million people in real-time (public data only)... I wrote a blog post about my introspection:

https://austingwalters.com/the-last-free-generation/

In a sense, it's open my eyes to the dystopia we are building and it's changed my outlook dramatically.


You might want to redefine "freedom" for yourself. I personally struggle with this too, but I find it useful to remember; I can still go down the street, buy something to eat, then go to town and see all that's around.


> I can still go down the street, buy something to eat, then go to town and see all that's around.

So can any animal in a zoo...

Freedom of self-determination is what I think most people define as "freedom". If I redefine freedom, I'd argue I should use a different word, as it wont convey the same meaning to others. When our world is manipulated around us to control what we know and to extent what we think, we are in a cage (at least most of "us" are).


I agree an animal in a zoo can do all those things, but an animal in the wild (usually a good example of being free) can do them, too, and to a much greater degree. I do not quite understand how the comparison works better for a caged animal as opposed to a free one. Draw a big enough fence, and everyone's always been in a cage?

Agreed that our world is manipulated around us, but I think the manipulations are much less influential than (a) the difference in society between now vs 500 years ago (and vs where we will be in 100 years) and (b) what we choose to believe and want for ourselves by thinking critically. Still, I do wonder sometimes about the things we choose to believe vs what society convinces us to believe.

How far off the mark am I?


Not off the mark at all, at least as far as I see it. I'm probably more free than a person 500 years ago could ever imagine... I'm also more caged than they could know too.

Times change, as do perspectives. Sorry I can't be more helpful.


true freedom is terrifying, we like to bind ourselves to things, be it our relationships, hobbies or goals.


Why is selling investment advise better then gearing your own investments?


It's hard to understand why if you're able to consistently do 100% yoy you'd even bother or waste any time selling investments products.


In 1987 I wrote about 150 lines of 68000 assembler that applied a low-pass filter to every sound heard by the towed-array sonar system on the Los Angeles class fast-attack submarines. I was an intern (co-op) and nobody even looked at my code. But it fixed the problem that had been plaguing the ANN-BQQ-5D system, preventing it from going into trials and 'management' just shipped it once the tests started passing.

Compared to other things (including some of the ID3 tag processing code that's still in Windows today, and OLEView) this seems pretty important.


For what it's worth to you, I still remember the first time I watched Windows detect that a folder was full of MP3s and enumerate artist/album data alongside the other typical file attributes, and feeling that it showed a big step in its development. It felt like something close to magic for Explorer to be able to do that.


The most important code I ever wrote was as a phd student. No one uses that code, but they use the concepts behind it every single day.

The Q was how does one manage large numbers of heterogeneous containers (VM sprawl was already considered a problem, but we said if containers took over the sprawl would be worse). At the time the primary container mechanism was Solaris Zones and people uses ZFS clone functionality to create per zone container file systems. However, this only really helps if your containers are homogeneous. I built a system that created container file systems out of composable layers. One would define template file systems as a collection of layers that are stored in local and remote layer repositories and these layers would be instantly unioned together on demand when one provisioned new containers. We also demonstrated that since heterogeneous containers are now easy to manage, we can not just use containers as lower overhead but similarly long lived VM replacements, but also enable them to be used ephemerally, opening up many new use cases.

You probably know of this by a different name today.


> The Q was how does one manage large numbers of heterogeneous containers

my god this man invented UPS

> At the time the primary container mechanism was Solaris Zones and people uses ZFS clone functionality to create per zone container file systems.

oh wait nevermind he invented docker


I wouldn't take credit for James E. Casey's work.


AUFS or something?


UnionFS came out of the my advisor's first phd students new lab (stoneybrook). Aufs itself was inspired by that. My inspiration came from saying we should combine this semantic with linux package management semantics (as can be seen clearly from the papers where I give a summary of it).

I took unionfs and modified to be more dynamic. i.e. for persistent containers, enable layers to be marked unlink and replaced with different layers (they would remain part of the union for data operations, but would be invisible to file system name oriented operations, ex: lookup()/readdir()). Idea for this was to enable a container to upgrade itself if the template it was based on was upgraded. I wasn't thinking what became the cattle/pet metaphor, was focused on creating a system that would work equally well for persistent and ephemeral containers.


I wrote a lot of code for payments processing at an Indian e-commerce shop & see/make it scale from 100s of QPS to ~200k QPS. Just having the code paths exercised by so many people over a day gives me joy.

One change that I will not forget that made the highest "perceived" impact with a one line change. The payments flow was at a different domain the rest of the site. This meant the users incurred a fresh set of DNS lookup, TCP connection establishment & a SSL handshake cost. The change was to load a "pixel" image from the payments domain a page before. It dropped the first call latency from 550ms to 100ms :-)


I'm an IT/SysAdmin type guy so I don't really code beyond web stuff at a hobbyist level, though I did do CompSci at uni way back when. However when I followed my partner overseas for a few years, the only job I had while away was working in a computational research group at a university.

I was brought on to provide a nice looking web UI for an online system that scientists could use to submit jobs to a server running molecular dynamics simulations. After finishing the job queue and interfaces though, I had plenty of time to spare. So the boss asked me to try and run some necessary manipulations on the uploaded PDB (protein data bank) files, before they would be sent to run in the simulation.

It's still the only time I have ever actually used direct material from my undergrad degree at work - using Dijkstra's algorithm and standard deviation to discover protein structural features, then manipulating them. It was also the only time I ever used the Python I spent just one semester learning a decade before. With all those libraries, I can understand why it was the language of choice my boss' field.

I made a log of the jobs as well, and in the 5 year since then, over 10,000 jobs have been submitted, helping scientists from dozens of countries all over the world. It's also the only code I've written since my uni days which isn't just typical web app type stuff. It's just this pokey little online service but I'm really proud of it, and I hope I've contributed to humanity's progress in some tiny way.


I added support for the middle finger emoji to the WhatsApp iPhone app.

Unlike other messaging platforms, WhatsApp provides their own emoji graphics to ensure backwards compatibility even on old versions of the OS that don’t support that emoji natively.


Very important!


This is great.


I designed and implemented the core algorithm that currently allocates Azure VMs to physical nodes (though the policies aren't mine, and I owe much credit to my coworkers for actually shipping it.) It removed a fundamental scale bottleneck.

Later, I designed an efficient solver for a category of NP-hard graph problems that currently powers Azure's WAN, 98% faster than the module it replaced.

Hopefully with time I'll be able to publish both. I had mental and physical breakdowns on the way, but those experiences make me proud to be alive.


I see. You must have been a Microsoft blue badge...


The most important code I “wrote” was merged with code from my wife and produced a tiny human executable.


I was at university working on a side project: I wanted to have my own movie torrent website. The idea was to list movies and under each movie list the best available torrents.

This is now a pretty common feature, but at the time trackers only had a list of file going like Titanic.1998.DVDRiP.Proper.MyGroup.

I was able to fetch the torrent, but the hard part was linking each torrent the correct movie (by IMDb ID). I tried for ages to get it right with reg exp to extract the movie title from the torrent name, use the IMDb API, and so on until I found the solution.

The solution, was to just simply take the torrent name, extract the year as the last 4 digit sequence, remove all regular tokens like dvdrip, TS, xvid and so on and perform an automated google search on the string: IMDb "Everything else" (Year). and extract the ID from the first result. It took me less than an hour to implement, and gave absolutely glorious results, matching movies with typos, rejecting non movie torrent and generally getting a fantastic accuracy.

I went on to release the website, which went on to become semi famous in the field and the consequences for me were :

- Sometimes complex problems actually have simple solution, think outside the box, you don't have to do everything yourself.

- I actually earned money from some ads I put there, which made uni life a lot funnier. I also experienced what it's like to put a ton of efforts in a product only to get a very slow growth. And then see "something" happen, and you get rewarded for all of that. In a way I felt like a founder.

- I maintained the website for years. I was able to apply most of what I learned in my lessons on an actual product, learn new stuff on my own, and faced challenges like scaling that my peers simply could not grasp. I finished uni with top grades and a significant reason for that was my illegal torrent website.

- I got a ton of recognition for my work from friends and family. Even met someone at a bar that wanted to show me the cool website he found when we started discussing movies. One of my bets memories. I started working at BigCo and did not get that kick anymore, which prompted me to change path and work in startups. Really happy with that choice.

The code itself was simple, not really beautiful or efficient, non scalable, completely against any TOS you can dream of, and the goal was to aid movie piracy. It dod not generate million of USD. It probably did not change the life of many, but it changed mine


Wrote whole ad tech platform and roped in the advertisers/publishers with my sales skill then received 5M payout got kicked off the company.

After that they hired sales guys from big companies because they had enough cashflow going.

I don't really regret it but he could have given me atleast 10% equity.

I didn't know that the project will ever end up doing multi million dollar business. I couldn't see it coming.

But I did whatever tasks of sales/coding/customer service were demanded from me.

And the worst part? My girlfriend left me for him because she met him at a party and got impressed by his Noveu rich lifestyle and a new supercar.


Same thing happened to me. The founder was a business major, knew nothing about tech but was Street smart and contacts with lawyers.

I developed an advertising tracking platform, similar to Voluum.com

But founder kicked me out and now they do roughly 10M sales from ad agencies.

He was even blogging about it how he did corporate Takeover and considered himself supersmart about this move.

He told me see pal, you are not my enemy but in life you only get on shot, either you can be loser or a winner, and you know what I'll choose.


The ending was incredibly sad. You don't need someone like that in your life, anyway...


I wrote some code related to a class action case supporting child victims of molestation by Catholic priests.

That said, the details of that ugly situation, extremely narrow scope of litigation and details of any possible settlements led me to stop working in the legal industry entirely. When we were working on that project I was simultaneously furious and in tears pretty much every day for weeks.


Important to the company? A system which could automatically perform partial-stroke testing on pneumatic emergency-shutoff valve/actuator blocks. The end goal was to allow big chemical plants to run for longer between maintenance cycles. The idea is you part-close the shutdown valve enough to prove it can move but not enough to interrupt process.

We were one of the first to prototype, and the only one to do it without needing a bulky valve positioner. The prototype worked on nearly every setup we could build in the lab. Then we added an automatic setup mode which nobody else had.

Alas, marketing got involved. "We want the manual setup removing, permanently. Not just disabled."

And of course the first sale, the customer was doing something which screwed up automatic setup and couldn't be worked around. Manual setup would have worked, but both marketing and management fought engineering tooth and claw to prevent us re-adding it.

The customer sent every single unit back. The stress burned me out (and more besides)... Not long after that, I was "managed out" of the business (read into that what you will).

On a happier note, most important to me? I help out a small-medium size volunteer-run fandom convention (think Comic Con on a smaller scale). I rebuilt their radio communications infrastructure, added call recording (for training/liability reasons) and staff-call pagers. At the staff debrief, the chairman called it "a game changer" and asked if I'd come back as their Head of Operations.

I said yes.


My first professional job was doing a little bit of work for the Human Genome Project. I've never done anything else nearly as worthwhile.


Could you outline what the code you wrote did?


At my previous company I created a buildpack that allowed our proprietary runtime to run on Cloud Foundry (an open source Enterprise PaaS like Heroku). I built the first version in my spare time in a couple of evenings. It made our software and company compatible with the platforms of major players in this space, including SAP, IBM, GE and Siemens. The compatibility made our tech and our company much more interesting to these companies. In fact, the company was acquired by Siemens last year for $730M.

If I would not have built it, another engineer in the company would have done it a couple of months later while explicitly being assigned the task. I proved that it worked within a couple of days. The code powers tens of thousands of deployments today and is also the basis for running on Docker & Kubernetes.


Probably this UI: https://www.facebook.com/live/create

I didn't do it alone of course (probably a dozen people have worked on the UI, and hundreds on the backend), but it was my main project for around 9 months. Lots of videos that people care a lot about go through there.


That seems like a very impactful project. Hundreds of thousands of people (millions?) have used Live videos on FB. Not many engineers can say they've made an impact like that. Congrats!


The first Flash game that I released [1].

I had been programming for about 6 years but had never finished anything of substance. The game took about 6 weeks of working on it between classes (and with the help of a friend with the polish and graphics). It went on to be played millions of times and made several thousand of dollars in ad revenue. Even 10 years and a PhD later, this is one of my biggest accomplishments.

It was one of those moments that makes me feel like now I can actually do this (this feeling seems to repeat every few years...).

[1] http://www.mindjolt.com/stay-up.html


Actually nothing, which makes me really frustrated.

I'm just building boring CRUD systems for boring companies. I can use a lot of concepts/buzzwords, like microservices, serverless... But at the end, just CRUD apps.

How can I improve? After 5 years just doing this, I don't feel capable of doing something cool like some of the posts in this thread.


Ehh, if you’ve only been developing for 5 years I’d say that’s fairly standard. Think about other fields: after 5 years practicing medicine you’re barely out of residency and still working 24 hour shifts doing the dirty work no one else wants to do. After 5 years as a lawyer you’re likely still an associate working 90 hours a week doing the same.

Just focus on learning new things as much as you can. Whether that’s from more senior guys at work or in your own time with side projects, all that matters is you learn. Then start applying for new jobs. You’ll probably be disappointed at first with rejections and/or the pay they’re willing to offer, but that’s fine - their feedback will show you where you need to focus your efforts to improve.


I used to work in the main office at the college I was attending. For my senior project I wrote a contact manager application that would also help with transcript analysis - allowing transcript data entry, prerequisite mapping, and schedule planning. Most of the students were working adults who had attended classes at other institutions but were unaware which credits could be transferred. In college administration, an 'Articulation Agreement' is a covenant between two colleges that says Calculus 101 at PSU is the same as Calculus 101 at UofO, and they should apply towards a degree at either school without much administrative effort -- that easy transcript analysis. It's more complicated when there isn't an agreement, or when the attended school has trimesters and the degree school has semesters, or when the names of the courses don't match but the content does. My application (and some personal guidance) helped a few students shave a year or more off their schedule by prepping them for meetings with the department head to get transfer credits for courses they'd already taken, or to test out of subjects they already knew from work or personal experience. If you're in college and aren't sure about how to schedule your term, the hour you spend with a department head or guidance counselor can be worth a full term saved. Do it early and often. If there's a class you'll be in that looks too easy, switch out as early as possible to save your time and your instructor's, and maybe get into that cool elective class that didn't fit your schedule.


I wrote a data collection and messaging framework for devices with a few MBs of memory, that had to stay powered-on and connected to a TCP socket server for about a year before they were going to be accessible again for maintenance etc. A bug in the code that could require a reset of the device could cost the company a big client. I couldn't find any ready-made solution that would satisfy all of the requirements. So I wrote, tested, documented and deployed it in a month almost single handedly. Two and a half years later, that code is still serving them.


I guess when I was 12 and had a Commodore 64 in my bedroom. I stayed up late and got up early to learn basic, put sprites on the screen, debug and otherwise get caught up in whatever I wanted to create that day.

I’d like to say thank you to my father for buying it and keeping the chocolate milk and powdered doughnuts flowing.


Oh man, this brings up so many good memories :)


For me too. Having that Commodore set me up for my future.


Probably 2FA at Pinterest [1].

Actually, on this topic, I'm planning a talk on how to build 2FA (specifically how to add 2FA to an existing site/app). If you need to implement 2FA or are interested in this topic, what would you like to learn from a talk on 2FA?

[1] https://medium.com/@Pinterest_Engineering/two-factor-authent...


In order to save a friend's answering service (small business), I wrote an answering service software package with PHP, using Comet (the precursor to websocket) using Asterisk as the PBX in 72 hours. Their previous system had been running since 1986, which utilized a 386 SCO server and some sort of external caller id / DID identification box that integrated with it. That caller id box died and a replacement couldn't be found, which pretty much rendered the system useless.


I was responsible for writing a lot of the Unity shell for Ubuntu with my team, taking it from Ubuntu Netbook Remix -> Unity (Mutter) -> Unity (Compiz).

During that period I feel like my team and I wrote a lot of important code, but the fact that Unity survived for so long and was used by so many people makes it stand out.

I'd say a close second was Avant Window Navigator (AWN - a Linux dock), because it got me enough attention to be offered a job working on Open Source full time!


Thank you for Unity! I was really sad when Canonical dropped it - it's taken a lot of hate over the years, but I have yet to find a desktop manager I like better... (And I'm still using it.)


Most important piece of code I wrote controls the delivery of electrical stimulation for a nervous systems stimulation system that goes in people. Second place is a human metrology system that diagnoses eye issues in a lot of clinical settings.


My entire full-stack web framework because it's currently what's used for all my commercial projects.

It has been the most beneficial project to me both financial but also in terms of gaining knowledge.

It's the most important code I've ever written because while some would say you shouldn't reinvent the wheel, by reinventing the wheel I have made my overall performance and knowledge ten times better.


Could you elaborate a bit? What tech are you using? What's the core design? etc.?


Yeah, I sure can.

I used the following tech: D (https://dlang.org) - Used as the primary programming language. vibe.d (https://vibed.org) - Used to handle the basics of http/https, but nothing more.

For the database tech the following are used: ORM (Supports the MySql/MariaDb/MSSQL engine) Mongodb (Uses a wrapper around the vibe.d implementation) MySql/MariaDb (Uses mysql-native) Redis (Usable through vibe.d) MSSQL (Uses mysql-native) PostgreSQL/SQLite (Coming in next version.)

The core design of it was a native full-stack web framework based around the ideas of ASP.NET, Razor and MVC.

You can find the project here: https://diamondmvc.org/ or at Github: https://github.com/DiamondMVC/Diamond

HN Post: https://news.ycombinator.com/item?id=16743476


20+ years ago when I was 16 I spent months to learn Turbo Pascal. Those were the days of reading thick books and diving into code samples you grabbed from your near BBS. I was working on a project to predict soccer games results based on past games and help gamblers spread their risk wisely. Looking backwards only now I understand how complex and big the codebase was and not sure how I survived to tell (no coding guidelines back then, the source was huge spaghetti mass, but a working one). Anyhow, the project got traction and a software publishing house started to sell it in computer shops nation-wide. Boxed software, 1.44" floppies. The good old days. It also earned me a decent money. -- Since then I've wrote thousands of code lines and stretched my expertise to leading development and product teams. I consider this project and those days to be my best tech-school, where I gained much more than in my BSc. Looking at the kids these days copy-pasting StackOverFlow solutions makes me think something is missing in their foundations.


Well, this is important to me, but it isn't exactly a scientific breakthrough or as worthwhile as what others might say, but several years ago at the utility I'm currently working for, we have this stupid method of adding users to a HMI...by manually typing in their user ID, their name and some default password into the user credential file onto the HMI (this is also a crappy HMI software, so the text document isn't even hashed) and then emailing said password to the users.

Anyways, what I did was write a VBA code that

1) Allowed me to take the user ID of the people that needed to be added into said HMI, then get their first name and last name from outlook using an outlook api and automatically adds these users into the credential files.

2) Send the email to the same list of users after I update the file onto the HMI (the HMIs themselves in an air gap network).

Why is this important? Because it got some of my other coworkers to trust that I can find bullshit problems and solve them (this isn't the only bullshit problem I have to do over the years), thus gaining their trust and overtime, got a promotion.


I think open source contributions / patches depending on the project can be helpful and impactful.

Merely giving back in any sense helps. Sometimes open source patches are not important in themselves, but taken as a whole make a big dent: A good portion (1/3? 1/2?) of my contributions are very trivial (typos, package updates, etc.)

I use a few things to track open source contributions: OpenHub (https://www.openhub.net/accounts/git-pull), and a new thing called sourcerer.io: https://sourcerer.io/tony.

It goes back to my first patches which were tiny and failed to conform to the project's code standards :P I hope this can be encouragement that little wins build up.

There are also projects I've made that I personally deem important, but aren't known or are in a niche space. For instance, unihan-etl (https://unihan-etl.git-pull.com), a tool for extracting UNIHAN (https://www.unicode.org/reports/tr38/). If someone is in a situation where they need an extraction of Chinese/Japanese/Korean unicode characters, this tool can save them a lot of time.

There's more to the story: It's also a building block of a larger project, cihai: https://cihai.git-pull.com. I am planning on making this project a spiritual successor to Christoph Burgmer's cjklib (http://cjklib.org)


I wrote an entire e-commerce inventory SaaS platform singlehandledly (frontend, backend, database, cache, nginx, blah blah blah) that had 100 users and about $30k/mo revenue.

Then I got kicked out by the owner high and dry after I refused to take sales calls and support calls on top of my developing responsibilities. :)

Software is still running today. It's probably at $50k/mo.


You're not alone on this. Similar story to yours. Every component of our system was developed by me, right down to the the business model as far as what users do day-by-day. I didn't speak up from the start about ownership, and once the product was profitable I was kicked out.

I'm still recovering from the burnout, now broke and unmotivated to move forward. Hundreds of users still spend their 9-5 hours looking at a user interface and performing their job that I'll never be credited for.


If it makes you feel any better, in the job market it made me realize my worth. I started making $40k/yr when I was 19 (because the investor/entrepreneur knew I'd do all of the work, had no other options, and would be hungry). At the end, I think he got me up to $120k/yr (no 401k, no a lot of stuff lol) but then deducted my pay because I argued back with him that I didn't want to do sales calls once.

From there, it helped me negotiate higher salaries because I could say and prove "I can build entire web platforms front to back and maintain them (and architect/deploy them) in production". I don't make $350k/yr Netflix/Google money but... I do pretty well for my age/skill set/years of experience I think.

I'd say the startup helped me go from junior to mid to senior level engineer quickly, and gave me the confidence in interviews to demand and know my (reasonable) worth.

Let me know if you ever want to vent. I'd love to listen and console.


Wanna write a competing software solution?

If they didn't have an IP contract, I'm interested :D


The hard part in my eyes is the marketing/advertising. Getting a landing page built, on-boarding customers (every customer wanted custom development to fit their business), getting well written app store listings written, getting support + documentation written for the customer. Videos, images, graphics, blog articles. We'd be up against startups who get $15m+ in funding and have a 7 year head start.

I think the market space is beaten down. At first, we were going to do a free beta. That attracted nobody. Then $29/mo. Well, will you look at that? It's not profitable undercutting everybody because of something we didn't think of: support. Ok, let's try $99/mo. Well, that kind of works, but people are coming and going way too quickly. What finally worked is to do $99/mo per user, with a minimum of 3 users. All other companies in this space pretty much charge a $750-$3k onboarding fee because they have realized what a time suck you'll be.

I have proved I can build pretty much any SaaS platform (which I'm sure 100k people here could do). In my opinion, it isn't the technology part that is hard (CRUD API endpoints are trivial to say the least). The super hard part technology wise is good user interface. Naming technical things easy terms (your item in inventory... is it an item or a kit/bundle? ok... how many channels do you sell it on? ok, well, you have 3 listings that are linked to your kit/item. Try getting that concept across)

Plus, after people choose a system, they invest a ton of time into it (their entire business lives and dies on it. Sync inventory + pricing for Amazon/Jet/Walmart/Shopify. Purchase orders. QuickBooks exports, yada yada). Not a lot of people signing up left and right, and if they were, they really probably weren't worth the headache (anybody can make a "mom and pop" e-commerce shop, but if you have no business/orders, all you have to do to fill an 8 hour day is take out your aggressions on the person on the other end of the phone supporting your failing business inventory software wise)

I'm down to write whatever, but we need marketing + advertising + everything else I just described.


If the two of you manage to pull this off, please update us. I would love to see a story of people meeting in the HN comments and go off and build something. I'm sure it has happened on here, but I never hear about it!


Let's connect. Could you shoot me an email real quick? j.horne2796 AT gmail. :)


I would be interested in something like this as well. ;)


'This small company was created by three developers who found a joint calling: getting fucked by previous experiences in startups' - YCombinator 2020?


I responded to muffins comment. I want to get in touch with you guys. I'd love to see where this goes.


Do you have marketing/advertising skills or do you think I'm over-exaggerating how hard it is to gain marketshare?

I think we need a blend of developer related skills and non-developer related skills to be successful.


I don't know how comment response notifications work on HackerNews but... I just responded to the thread above. Let me know your thoughts.


you are not alone. i got layed off from project that i have worked for 2years from scratch. it's quite successful now. i learned my lesson now.


What lesson would you summarize that is?


Sad story! Did you get any sort of shares/equity?


I think legally he knew he had to give me something as a parting gift to cover his ass (he was really smart. He once sued a company by spending a ton of $400-$500/hr lawyers just to get them to change their name because it was too close to his on another product line he had going) so when he fired me, he told me I could keep the iMac he had let me order when I was an employee.

I never looked into my rights because I knew he was worth $50m and I was worth $5 and he'd win no matter what.

I still drive past his new Ferrari sometimes and wonder about what could have been if I just kept my mouth shut and agreed to be his whipping post bitch...


It's not really coding, but I helped with troubleshooting and analysis when Obamacare first rolled out.

There was quite a fire-- the front-end would crash, lines were endless, etc. The government quickly formed a Tiger Team, with contributors from various companies.

I didn't care for the way the legislation was formed, but I am proud of my involvement. I gave it 100%.


Oh wow. I remember that. Cool to hear of your involvement.


# As a programmer

Some software for GAE, that may now be part of the SDK - at the time, circa 2010/2011, GAE wasn't being actively maintained (the employee in charge of the platform had other responsibilities and did not care for GAE).

The code allowed a user to define a model of the errors they expected to encounter, a retry algorithm, and a maximum amount of errors. It was used to do almost everything in the largest GAE app at the time, and one of the most profitable Google programs, and is essential for doing anything in an environment with expected transient failures.

# Back a decade or so when I was doing ops

'at' jobs to reset the firewall in 10 minutes, while we were remotely configuring a firewall. If we locked ourselves out, we wanted for the at job to execute. If we configured everything successfully, we cancelled it.


I got involved in the SAME era, reading the same QB tutorials (remember Tsugumo or Gradius?). It changed the trajectory of my life forever. Called another guy from the same era after finding his github page 1 or 2 years ago. He is a PhD making ~$300k on Wall Street and I'm a senior leader, only slightly behind him, doing tech consulting. Needless to say, writing code early puts you on an advanced path. Neither of us came from privileged families, but we found a need in the market for highly skilled programming combined with great communication. If you are reading this comment, you have 100% definitely used or seen one of the systems I have helped build. QB was the beginning for many of us. No doubt JavaScript will do similar things for this generation.


I definitely remember seeing those names. I can't tell you how awesome it was for me to read this. If you ever want to connect and discuss some stuff, let me know. My email is j.horne2796 at gmail.


The most important I can think about right now is a CLI Mac app to install apk/ipa on devices (iOS and Android).

You see, my company has about 10 apps, all sort-of maintained, that we manually test on several devices for each single feature (because not having bugs is very important).

Previously, devs (we are only 2 devs) were disturbed all the time to build apps and install them on specific devices.

Because I was fed up being disturbed all the time, I automated all builds, then created a CLI app to install the nightly build on all USB-connected devices at once. Then teached the QA guy how to SSH onto the build machine and invoke the command to install.

It's used daily, several times a day.


wrote an entire CRM platform for a niche which is still my business today. revenue is at ~200,000 $ per month, profit margin is >60%.

Tech stack: MySQL, Java EE, JQuery, Bootstrap and the like. No big frameworks. All hosted on Google Cloud.


I did the same for an area related to mental health. Generates about $5k a month, so nowhere near your level, but it pays for the kids to go to one of the best school in the Santa Clara Valley. So for me, it’s the most important code I have ever written. Second most important is code that does some video and audio stuff that runs on about a literal billion devices.


Stories like this are incredible. If you ever want to go into detail with this story in an article or something, I'd love to read it.


Thank you, I don't enjoy writing anything else than code or short texts/comments though.


I probably couldn't afford to pay you to change your mind but I could volunteer some time on a project or something in exchange for you answering a few questions that I could turn into an article about your success, perhaps? Win win?


Thank you for your offer. No offense, but that would be of no use for me. I learned that external outsourcing of development tasks is not effective at all if you want to focus on delivering quality that customers really love.

Another point is that my market is really not obvious at all and I want to have competitors as late as possible. Currently there are none I know of. Only competitors who solve parts of it which existed before me anyway.


I'd also be very curious to know more about this.


Like others, it depends upon what you mean by important.

In grad school I helped another PhD student by writing control software for a device used to assess the locality and severity of brain lesions. I got a tee shirt for doing that work.


A ringbox mailbox multi-threaded implementation.

Whilst I'm sort of proud of the 'word at a time', always contiguous and zero copy aspects of it... the important bit is the metadata.

All the optimization was really to allow me to record metadata around...

* When was a message posted?

* When did it start to be handled?

* When was it finished being handled?

* What was the correlation ID? (ie. the ultimate causal source of the events chain)

...and then extract this data into a sqlite DB and either query that directly or to create message sequence diagrams with the mscgen tool.

Why is this important?

Because I have lost count of the really hard, gnarly real time bugs I have solved using this tool.


For me, it's been codes that have been for internal use. One ran a room full of production machines. Another has been in use for a decade, and is the main utility for manufacturing a complex apparatus that requires a lot of adjustment and testing steps.

So each time one of these programs goes through its mainloop, a little bit of money comes into the kitty. ;-)

Possibly a coincidence, but these are also the programs that I was the most disciplined about writing so that they have been in production for years with extremely small and manageable lists of known bugs.


I wrote an important piece of the business logic that compensate trasactions in the ATM circuit of my country.

I also wrote the transcoding and CMS component of a video streaming application that is used all around the world by several broadcasters. I played a decisive role in the optimization of many of the underlying processes.

It might not be fashionable here but all the work I did have been in C++, Java and .NET.


I currently work for a company that is focused in increasing online privacy. Everything I write now supports this effort. I've never felt better about a job.

Second to that would be the games I wrote on my TI back in high school (90s) when I should have been learning trig. That and some late night script kiddie exploits got me on the path to a career in tech.


Hmm, nothing too sexy. The most important code I've written was a tool to automate some business logic for schematics generation, hard to quantify the exact cost savings but it saves a couple of million/year (cost of writing off hardware built on a bad schematic) and hundreds of hours of engineer time / year.


A long bunch of tests for a python RPC I was writing. My boss did rewrite the core code against the tests, so I could merge his code without even understanding it fully. And until now the test code is still healthy and growing, and it proves the core code to be working as expected.


I worked in a advertising network company which is a major player of one city. I re-write the ad-serving algorithm to solve some of the problems. That piece of code is running 24/7 for 5+ years. If you are in that city and browsing the web. It will run through my code path.


Contributions to open source software. Knowing that the code I wrote runs on millions of machines feels great.

Also, another favourite project of mine is my book, written in Markdown+LaTeX and hosted with Git. Writing and editing experience was great.


Literally a logstash clone. Was written in an emergency over like 6 hours on a weekend to prevent a P1 issue.

I've done some bugfixes and modifications over the years but it just keeps on trucking and doing exactly what I need it to do.


Tiny patch to OpenSSH, but it'll get onto millions of boxes eventually.


The most important code I ever wrote was probably the control system for a submersible robot we developed in grad school. It was important not so much from a money standpoint, but because a whole group of graduate students got their Masters' and Doctoral degrees using it, it was sort of my bequest to humanity. And boy was it a hack...

I had decided to use a new single board computer on the robot that used a compact PCI bus, which at the time was a brand-new standard. It was very expensive - $25,000 - which was a whole lot of money for a university lab, but the computer had specs that we just couldn't beat with other existing single-board computers at that time.

There were no available compact PCI motor controller boards, so we had to use a motor controller board that was built for a different bus standard, and then convert from the Compact PCI system to the other board using a bridge chip. The particular motor controller board we chose was based on an 8-bit motor controller IC, the LM629. This particular chip uses memory-mapped 8-bit registers, and in order to communicate with it you have to write and read the registers in a very specific order. If you do anything in the wrong order, or you try to write to a read-only register, or vice-versa, the chip generates an error.

I was a decent low—level C programmer at that time, and was able to crank out the code in two days. But it didn't work. Whenever we tried to communicate with the chip, it threw an error. I went over the code with a fine-toothed comb, and I was absolutely certain it was all correct. I had no idea what was wrong. I was looking pretty bad to my advisor; I was the C stud, and I couldn't even write this simple device driver. And worse, I had recommended that we use this particular computer system, which cost $25,000, far more expensive than any other SBC we had ever bought, and now I couldn't make the thing work.

Finally, after banging my head against it for a week and making no progress, we threw up our hands and asked the motor controller board vendor if we could bring our system to their facility and get their help debugging it.

We arrived at the vendor and set up. Their programmer checked my code, and he couldn't find anything wrong with it either. After two days the owner took pity on us and asked his best engineer, a digital logic expert, to help us. He carted in a $20,000 digital logic analyzer and hooked it up and had me run my code. What he discovered was that when I had issued an eight-bit read, the chip saw a 16-bit read, which it wasn't expecting, so it threw an error, because the high-order byte was getting read from a write-only register. But the code was clearly issuing an 8-bit read. So where was the 16-bit read coming from?

It turned out the bridge chip had a bug. When it saw an incoming 8-bit read request on one bus, it translated it into a 16-bit read on the other, then threw away the most significant byte. We called the manufacturer, and were told "that's known, documented behavior - it's clearly spelled out in the manual." And when we checked, sure enough, it was - it was mentioned on page 48 in the third footnote, in 8-point type.

The solution we eventually came up with was to cut all of the address bus lines on the motor controller board and shift them to the right by one, and then take the least significant bit line and connect it to most significant line on the address bus. That way, access requests to any odd 16-bit memory address would map into unmapped register space so the LM629 wouldn't see them. Then I rewrote the code to only use even memory addresses. Worked like a charm. But I still feel sorry for the grad students who had that robot after I graduated. There was no way they ever figured out what I had done. Or why.


Improvise. Adapt. Overcome.

Thanks for sharing that nugget!


I’d have to say the headless server infra/features for Windows server 2003. The previous dev quit saying it was impossible, but as a new engineer I didn’t know any better.



Machine vision applications to inspect inkjet printheads during manufacturing. You've probably used a cartridge my apps inspected.


Adventures in Game Development is the perfect example of the risks of giving assholes your money for crowdfunded projects.

The guy that runs it spent years bragging about doing drugs and drinking to all hours of the night with nothing to show for it and then shits on his backers for asking about the progress of the project (none).


Link to the Kickstarter?


Nothing.


Same. I don't think anything I've written is really important in the grand scheme of things. Important enough that someone will pay me to do it, yes. But not important, really.


My most 'important' thing was probably a novelty passcode for phones. The important part was the timing of getting it done, as I was low on funds and this allowed me to continue on the path I was onto (still to this day) instead of 'retreating' back home.


"<!doctype html>"

Four years ago, I was hired to reboot the front-end development of a french search engine from a blank html page. It has millions of users now.


tl;dr: the most important code I ever wrote saved us millions of dollars by setting `disabled="disabled"` on an html element

I don't know if this is the correct measure for "most important" but it is provably and measurably the most valuable (in terms of dollars) code that I have ever written.

I used to work at a fintech company. This company gave out loans. One of the main reasons you might get a loan at this company instead of a bank is because the bank refused to give you a loan. So, as you might imagine, this company needed to deal with a considerable default risk, and be very, very careful in its underwriting.

At one point, we had a minor crisis. The default rate was considerably higher than we had projected, and this was threatening the business. Without getting into details: this was potentially an existential risk to our business.

Preliminary analysis of the problem revealed a few significant causes. One: our underwriting rules were complicated, and manually applied. At the time we were working on a rules engine that would offload a lot of fiddly rule checks, but this was still a few months out. In the interim, people would manually check the spreadsheet and they made mistakes.

I was tasked with fixing this with a stopgap. So what I did was I added about 15 lines of code to our front-end. It collected a handful of stats (that were already being exposed to the front-end) that covered ~80% of the underwriting cases, and hard-coded the current underwriting rules on them. If the stats on a given loan didn't meet the threshold, and would therefore be rejected by our manual underwriters, my code disabled the 'approve' button.

The entire code was a function that looked something like

```javascript THRESHOLD_1 = 123; THRESHOLD_2 = 123; ... //etc

function buttonDisabled(){ if( stat1 < THRESHOLD_1 || stat2 < THRESHOLD_2 || ... //etc) { return true; } else { false; } } ```

plus the react binding necessary to attach this to the approve button.

I got this done start to finish in about two days (most of those days spend talking to PMs trying to figure out what the values of the THRESHOLD constants should be), and it was deployed in prod by the end of day 4. It was cheap, terrible, shitty code, but that was ok! Because it was throwaway code. We had an existing project to replace this with an actual rules engine, and it was on track to get rolled out two months later. So who cares about shitty code, it's getting replaced in two months. In the interim, speed was more important, and they got speed.

By my own numbers (based on estimates as I didn't have access to real numbers), I estimate that this code saved somewhere between $500k and $2M in defaults. Whatever it was, the company agreed. Every Friday afternoon the CEO would hand out recognition awards for someone who went above and beyond, and for this code I won the award three weeks in a row.

tl;dr: the most important code I ever wrote saved us millions of dollars by setting `disabled="disabled"` on an html element




Applications are open for YC Summer 2019

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: