Inspired by the great folks at despair.com
Comments : Leave a Comment »
Tags: demotivator, despair, great valley, Land Before Time
Categories : Hobbies, Huh?
Exile III was one of the most amazing, nostalgic games which I still play. It’s based on old D&D character creation, but with some unique differences in skills, etc. The point is that you level up your party while you are exploring the surface world. You’ve been banished to the underground “pit” civilization called “Exile”.
You are an adventurer party which explores the surface, reporting back to your Exile coordinator about the things you find up there.
Things get complicated as the story progresses, but it’s very heavily open-ended in the game play style. You literally go where your little heart leads you, finding out more and more about the surface in a very non-linear way. There are tons of “side” plots that you can discover. As time progresses, cities and towns literally become overrun and sometimes destroyed by the forces at work in the world, keeping you interested in the world you’ve become a part of.
The game came as a trial, which impedes you from travelling further north than an predefined invisible line. I won’t promote pirating a serial key or an EXE patcher, but let it be known that I have seen one of the latter once upon a time, and the game was remade as Avernum (which I didn’t like nearly as much, for several reasons) and so Exile III has been cast aside.
The game comes with a save-game editor, which is pretty sweet. Most of the good stuff is enabled only after registering, but you still get several freebies like “heal hp/mp”, or “make towns forget you” (for those times where you decided to lead an assault on those innocent citizens of the town, thereby invoking the never-dying wrath of the town’s guards). Of course, no game is fun if you cheat your way through it, but at the same time, no game is fun if it is mercilessly hard with no hope for success if you’re ever in a weird jam.
Some notes about the playing the game:
- The installer you download from the Spidersoft page is actually more like a self-extracting exe. So, when you run it, it will expand the *real* installer into the same directory, so make a temp folder first and place the “exile3v10.exe” file into it before running it. After extracting run the “INSTALL.EXE” program to begin.
- The installer is a bit archaic, and defaults to the C drive, no matter what your main drive is.
- The installer can’t install to a directory with spaces or hyphens in its name. It’s no problem though, if you install it someplace easy first, and then just move the installed folder to the spot where you want it (including paths with spaces).
- All of the graphics are just bitmaps in the local game directory, so you can edit them to be whatever you want! 😀 This makes for some fun edits, like making one of the characters a giant Yoshi, or something. My personal idea for a character set will be posted soon for anybody to download 😉
- Vista and Windows 7 sort of molest the game, so I just set it to run in compatibility mode for Win95, and everything got better.
I guess that’s all for now 🙂
Comments : 1 Comment »
Tags: Exile III, Ruined World, Spidersoft, vista, windows, Windows 7
Categories : Games, Hobbies
So, this isn’t tough stuff, but any gui-loving user will find themselves in shambles when put in front of a l?[ui]n[iu]x (pardon the regex) terminal. That is to say that it’s OKAY if you’re good “at computers”, yet you can’t fumble your way around a unix-style terminal.
I recently set up my own headless (no GUI) Ubuntu Linux, 8.10 server edition on an old computer I have lying around. I decided that making it run Apache and my personal SVN repositories (while doubling as a 160gb backup drive 🙂 ) was a good idea. Problem is, after I got it all set up, I of course have no decent programs, and suddenly find myself wanting to browse the web on my new server box, to find the appropriate urls to feed to the ‘wget’ command. And I’m tired of pushing my monitor’s “switch input source” button.
By default, Ubuntu tries to abstract the root account from you by letting you perform “root”-ish operations with your own account, using the sudo command. But sometimes I just want to be root for an effing minute while I do stuff. By default, Ubuntu comes with no password on the root account, meaning that it also won’t let you sign in with it directly. Blank passwords are a no-no.
$ sudo passwd root
^^ that ‘$’ is the intrawebs’ way of saying “this is the start of a unix command-line thingy”. And that’s the technical term, trust me.
This is actually the command to change ANY user’s password, but it just so happens that you’re changing the root password, so you of course need the all-powerful pixie dust of the “sudo” command. If you were root already, or some other empowered user, you would only have to type:
$ passwd USERnameGOEShere
And it would prompt you for the new password. But again, if you don’t have good enough authentication, it’ll make you do “sudo” in front of it, or be root altogether.
As pointed out by Dave in the first comment below, the “sudo -s” command is a way to obtain sudo permissions for a more extended period of time. If that’s all you want, then go for it. But if you’re looking to actually give the root account a password, then you’ve gotten your instructions already.
Comments : 2 Comments »
Tags: Linux, passwd, root, sudo
Categories : Hobbies, Linux, Ubuntu
Despite my distaste for Java, I work in it every day at e-kiwi (author of software Screen-Scraper).
As usual, I was surprised to find that Java has no easy way to count the number of occurances of a substring within a given String variable. I Google’d it and was surprised at the first result’s poor coding. It had a ‘while (true)‘ loop with a goofy break statement tied to a misleadingly-named variable.
public int countIndexOf(String text, String search)
int count = 0;
for (int fromIndex = 0; fromIndex > -1; count++)
fromIndex = text.indexOf(search, fromIndex + ((count > 0) ? 1 : 0));
return count - 1;
Pardon the ternary operator in there, but Java doesn’t like making boolean-casting-to-int easy.
If there are any errors you encounter, just let me know and I’ll fix it. My use for such a function doesn’t require the ‘border’ cases where substrings are at the beginning or end of the main string. If you know that you don’t need to match a substring which will begin at the first character of the main string, you can change the ternary part from:
fromIndex + ((count > 0) ? 1 : 0)
fromIndex + 1
Sorry to the dude that I flamed on his blog, but poorly written code is easy to find these days. Idioms are the way to go. Java’s slow enough as an interpretted language that it doesn’t need extraneous if-else statements in ‘while (true)’ loops and incessant variable assignment to immutable values.
You might argue that it doesn’t really matter if you lose a few cycles on today’s machines, but programs should be as efficient as possible when it’s worth the time. You may as well take a few minutes (or even an hour) and figure out the best way to do something. Forethought with save you an amazing amount of time in the future when you develope real programs and not just school assignments.
Comments : 7 Comments »
Categories : Hobbies, Java, Programming
Here is a line in python that should be recorded for posterity…
Some background. I have a multilingual database where several tables exist. Each table is named after a particular “vocabulary” for my website. For instance, there’s a “forums” table for all the terms that are used for pages related to the forums. The purpose of having this table is so that I have all the needed terms very isolated into a nice hierarchy. The SELECT * sql would look like this.. (pardon the fake spanish translations)
mysql> SELECT * FROM forum; +---------------------+----------------------------+------------------------------+ | ID | enUS | es | +---------------------+----------------------------+------------------------------+ | Audio Review | Audio Review | [Audio Review] | | by | by | [by] | | complete | completed | [completed] | | current | current | [current projects] | | dropped | abandoned | [dropped] | | loading | Loading... | [Loading...] | | no | no | no | +---------------------+----------------------------+------------------------------+
As you can see, there is a column “ID”, which is what I use site-wide to access a term, and I select only one other column, according to the language code the user has his/her preference set for. Thus, a general select for such a thing is …
mysql> SELECT ID,enUS FROM forum; +---------------------+----------------------------+ | ID | enUS | +---------------------+----------------------------+ | Audio Review | Audio Review | | by | by |
… etc, etc. Then, I just used PHP to fetch these results into an associative array. I would then have to loop through each record, saving whatever is in the $row[‘ID’] spot as a key to this array, and whatever is in the $row[currentLanguage] spot as the value to said key.
So anyway.. I was trying to achive this effect in python; a Dictionary-type object where I can simply index into it with the term that I want, in order to get the language-translated value represented by the term. I knew there had to be a way to do a famous python one-liner, and since those one-liners typically clock much faster than manual loops..
resultSet = (map(None, row.values()) for row in rows)
Seems simple, but it’s a hassle to work it out when your data is a tuple of dictionaries 😛
Comments : Leave a Comment »
Tags: forum, map, MySQL, MySQLdb, php, Programming, Python, translation
Categories : Hobbies, Programming, Python
One of my interests is languages. Included in that is Japanese. Perhaps some of you may shun me for claiming I like Japanese, yet I don’t fit that anime-addicted mold that tends to be the basic framework that Japanese groupies persue. Truth be told, a person can like, and even love, a language without fitting such a mold. I prefer not to deign to any insulting level, though, so I shall move on before my tounge starts cutting people.
My wife speaks japanese. I’ll leave it at that.
Each week I read a blog by a japanese woman named Miko, who has a talent for posting just the sort of stuff that I find interesting… it’s not the web-log (blog) of an uber l33t hackzor with an anime collection to rival those that I would insult in paragraph 1. Instead, it’s a normal person with normal experience, yet who finds fun things that are (in reality) little jewels of interest. I think the blog is great 🙂
Enjoy, if you choose to so do.
Comments : Leave a Comment »
Categories : Hobbies