“An introduction to Magit, an Emacs mode for Git” – http://www.masteringemacs.org/articles/2013/12/06/introduction-magit-emacs-mode-git/
I was reading through Coders At Work and realized that I haven’t done much code reading lately, other than reading through code samples in tutorials and articles. The interviews in the book suggested that code reviews and code reading are one of the most important things you can do as a professional programmer.
I’ve been doing some stuff with AngularJS and one of the key ideas is dependency injection. Here’s a deconstruction of injector.js which contains all the functions and classes for dependency injection.
I was trying to setup autoconf and a configure script for DeskNewsBlur and noticed that there had been a new stable release of wxWidgets, so of course I had to upgrade. I grabbed the source code, compiled it and installed it them realized I would also have to recompile wxJSON to use it. Unfortunately the library hasn’t been updated in a while and would only work with GTK 1 or 2, not with 3 which is what the latest stable release of wxWidgets can use.
I had to update the configure script of wxJSON and it worked.
…that took me a day just to get DeskNewsBlur compiling again, I didn’t even work on the code just the yak shaving of using the latest wxWidgets release and writing up an Autoconf script.
In the game BloodFox Net you have to crack into servers to complete missions. I’ve tried to figure out the best way to represent this and I’m using Uplink and Hacker Evolution Duality as references. In the game Uplink, there’s timing; the people guarding the server will try to trace your IP address and possibly attack your computer or just call the cops. In the game Hacker Evolution Duality, you can attack a firewall but the animation for this isn’t appealing, there’s no tension. While the firewall is being attacked you can’t take any action other than to disconnect from the server. The firewall attack animation is just killing time while you’re sitting there waiting, you don’t have any affect on the progress of the attack which makes it super boring. It doesn’t matter if the music is high paced but the tension is lacking when you aren’t involved somehow.
I was discussing this lack of tension with my friend and we agreed that Uplink’s representation was better and increased the tension, mostly through the timing of events. When you’re attacking a server, the trace tracker starts and there’s a limited time before the server traces the attack to your computer so you have a limited time to crack the firewall, crack the passwords and steal the files or do whatever you need to do on the server to complete the mission. You can increase this time by having better hardware or software. As the timer continues you also receive an audio cue to let you know that the trace is progressing or narrowing down to you.
So here’s what I came up with:
When you try to connect to a server, you can clearly see that there is a firewall to crack, that there’s a router that you also have to crack (I probably have to rename the router to something else) and then finally you crack the defenses of the server itself. As you’re attacking, there are three programs that you can use to try to speed up the hacking. They have a randomized energy cost and they have a success rate based on the player’s hardware and software and based on the level of the defenses. These are extra attacks on top of the cracking process so a player doesn’t have to use them. However it reduces their chances of cracking the server since there is a trace happening. If an extra attack is successful, then the cracking moves on to the next level until the server is finally cracked. When the server is cracked, the programs at the bottom will be available and their energy cost will be randomized (or based on the server defenses, not sure about it yet).
Also, players can connect to the server they’re attacking through multiple servers. This gives more interactivity and things to do in the game but it’s also practical, it can increase the time it takes to trace the player’s attack.
When things are going bad and you can’t crack the server or it’s taking too long or the trace is almost complete, you want to hit the “disconnect” button. I’m not sure what will appear on the next screen either.
My reservation about this design are that the trace is real-time, so latency may be an issue. What if you press disconnect just before the trace is completed? Will that even happen or will players always disconnect earlier? The other problem I have is that with most casual games you can start a task and if it takes more than 10 seconds you can just leave the game and come back. With BloodFox NET you won’t have that option when you start attacking a server, you’ll have to be in it for the minute that it takes to attack the server. I’ll tweak this, but I think one minute is a good guideline to use.
After I get this is done I can think about the next step; using programs on the server.
Nice small post showing some of the lesser used directives
This looks really good, I really like how simple it is:
The reason I created yelpapi is because I wanted to create an implementation that was completely flexible with regards to both input (i.e., it uses
**kwargs) and output (i.e., it returns a dynamically created
dictfrom the JSON).
You can check out the code on github: https://github.com/gfairchild/yelpapi