What was your favorite program to build?

inachu

Platinum Member
Aug 22, 2014
2,387
2
41
I know some programs are a pain to make and some are easy and fun.

Does not matter if this was for school or on the job or at home.
 

Ken g6

Programming Moderator, Elite Member
Moderator
Dec 11, 1999
16,695
4,658
75
[thread=1367071]This was a fun one[/thread].

So, a guy walks into the Distributed Computing forum. He wants to calculate something: How many distinct games are possible in bowling? He's developed a program that will do it, but it will take something like 18,000 CPU-years. So he wants to make it a distributed computing problem, and have lots of volunteers run the app.

Well, I thought it shouldn't take that long to solve the problem. I first had to learn how bowling scoring works, though. It's not as simple as you might think.

But since the guy had posted his source code, I went ahead and started optimizing it. Slowly but surely, through several versions, I made it faster. At first, as I recall, I was only able to implement dynamic programming in it partially, because at each step a strike could lead to extra steps. But, eventually, I found some kind of double-dynamic-programming solution. I don't remember much about how it worked except that's what I called it, and using it I got a program that solved the entire problem in a fraction of a second. :)

tl;dr: I made a program faster by about 14 orders of magnitude. :D

I should also post my anagram unscrambler sometime. I don't remember how it works, but at the time I thought the algorithm might be novel.
 

Spydermag68

Platinum Member
Apr 5, 2002
2,616
99
91
A sudoku solver was fun to make. It is problem 96 on project Euler. My first one that was just brute force. I made a 9 x 9 grid and would populate the is from a file. Every square would pass the grid to a recursion loop to find the next number. If I could not find the next number it would return a null grid.

It got the answer in 3 seconds, for 50 puzzles.

To speed it up I added a hunt and peck to the front end. It would look for boxes that only 1 number could be placed. It continued until no more numbers were added and then it went to the brute force approach. I shaved off a second so under 2 seconds.

The next step was a persistent grid to hold all numbers that could be in a square. This cut down finding all of the numbers that could be in the current square I was evaluating, but I was also updating 28 other squares. This dropped the time down by only .2 seconds on repeated runs on average.

I then put a counter in to see how many of the 50 games were solved by the hunt and peck verses brute force. It tuns out most of the games were solved by hunt and peck.

The next optimization I did was to to store all of the 50 games into the code. That only improved the time by .2 seconds and my final times are about 1.5 seconds on average.

The only thing I think about speeding up my code it to multi-thread it, but with the small number of games I think the overhead would eat up any advantage I would get.
 

purbeast0

No Lifer
Sep 13, 2001
53,637
6,521
126
probably all of the mobile apps i've done on the side. they are more fun than stuff i do at work because it's my own ideas that i create from scratch and do all aspects of them. the games i've done (well only 1, another one is in the works) are more fun than my utility apps. my most recent game is pretty fun/rewarding because i'm doing online multiplayer, and it's pretty cool the first time i saw it working on my phone playing against my wife on her phone.
 

slugg

Diamond Member
Feb 17, 2002
4,723
80
91
I wrote an extremely high performance business process management framework from scratch. It was journaled, durable, redundant, horizontally scalable, and featured non-locking parallelism. In short, it was ridiculously fast. Even though it was designed for a load balanced environment, our performance labs couldn't choke even a single instance. They estimated a theoretical upper bound of 2.5 million transactions per second. Ironically, I think I could have gotten it faster if we eliminated the need for horizontal scaling! ;)

Another really cool thing I'm working on now is linking Visual Studio (specifically, C#) to Eclipse (specifically, Java). As you type C# in Visual Studio, equivalent Java code is generated/duplicated in Eclipse. This may seem incredibly pointless to you (and I would agree), but it's definitely cool. There is a real application for this at my current job.

I guess another cool thing I did was an automated metadata generation system for Mars Rover imagery. Gotta love machine learning and JPL!

Automated cancer malignancy descriptors was another cool project...

Damn. I really love my job!
 

sm625

Diamond Member
May 6, 2011
8,172
137
106
Back when I was playing speed chess on yahoo alot, I occasionally encountered players who I thought were cheating. So I wrote a program which scanned the screen, ran the results through an open source chess engine, and then moved the mouse pointer as needed. I later took apart an old wheel mouse and ran the horizontal and vertical signal lines to a digital I/O board so that no one could detect me cheating since I was actually sending the input through an actual mouse. At the time I didnt know that yahoo had no way of knowing whether I was using an actual mouse or just a mousemove function.

A few years later I started playing shadowbane. One day they removed the /tar command which allowed you to target a player no matter how many were standing on top of him. I wrote an OCR algorithm that scanned the player name box and cycled through targets until it found a match. Nowadays I think I could just get the name from the program's memory using one of those cheatengine type programs, but what fun is that?
 
Last edited:

Leros

Lifer
Jul 11, 2004
21,867
7
81
I can't say an particular program in particular. The favorite things I've built are systems involving many programs.
 

neocpp

Senior member
Jan 16, 2011
490
0
71
Something which was purely for fun was a python program which did arbitrage in Magic the Gathering: Online. It would scan the trading bots and do some calculations (since you typically left some fraction of the monetary unit, an event ticket, with them). You started out with 2 when you got an account and I didn't want to put any more money in, so the first couple were critical and I confirmed everything it did until I got to 10. After that I let it go and it ended up netting me over 130 as well as enough for several decks I wanted (I had built-in a feature to keep an eye out for "good deals" on certain cards and not sell those).
 

Markbnj

Elite Member <br>Moderator Emeritus
Moderator
Sep 16, 2005
15,682
14
81
www.markbetz.net
A game called MVP Backgammon, in 1990 and 1991, just because it was a labor of love. It started with just trying to display a bitmap of a board using the GDI in Windows 3.1. By the time it was published it had art, graphics, multiple game modes, betting, and two position evaluators: a dumb heuristic evaluator I wrote which played the "beginner" opponent level, and a neural network evaluator called Fiona that was written in C by two grad students, Justin Boyan and Marc Ringuette. That was also the only home project I ever made any money off of. The three of us got monthly checks for more than five years as the game kept selling in the middle east. As a guy with a young family (and I'm sure for my collaborators as students) that shareware money came in very handy sometimes.