CategoriesBlog Administration |
Saturday, February 6. 2010Fun with Android
For the last few weeks, I've ditched my iPhone in favor of a HTC Dream. I've been using manup's Eclair rom since I got my Dream.
There's a lot to love about Android. The platform is open source, the SDKs are readily available, and best of all, it's based on the Linux kernel. My impressions of it have all been good thus far. Although, with manup's rom, viewing high quality YouTube videos doesn't seem to work. After getting irritated, I managed to create a workaround (apk). Below are the details of how I did it, and how to install it, for the curious. Monday, November 16. 2009TI Basic Simulator
Recently I wrote a TI Basic (not Extended Basic) simulator as a proof of concept to determine whether or not such a simulator would be feasable in Javascript. Why TI Basic? Because it was the first programming language I ever learned. Yes, I still have a working TI-99/4A to this day.
PRINT is implemented enough to print simple values, and expressions. the ";" modifier isn't implemented. However, statements such as LET, IF-THEN-ELSE, FOR-NEXT, GOSUB-RETURN, DIM, most math functions, RANDOMIZE/RND, the CHAR subroutines, and most other commands have been implemented. Timing in Javascript is often inexact. This is the primary problem when developing any sort of simulation in Javascript. I can't wait until HTML 5 becomes fully adopted and a worker thread can be utilized to separate the UI from the rest of the simulation. A concept like this (and even more complex concepts) would be much easier to implement. Below, you can try it out for yourself. I've only tested this in Firefox 3.5, and lightly in Opera 10.01 (Note: It actually seems to execute faster in Opera, which is no surprise, but the cursor display is a little quirky at the end of a line.), so I'm uncertain whether it will work in other browsers at the moment. I just wanted to put this out there, and share it with the world. Perhaps I'll optimize this eventually, and implement the other pieces. It'd be interesting to see some of those old programs running right in the browser. As far as I know, I'm the first to ever create such a thing... Friday, November 13. 2009Reverse Engineering the TI BASIC PRNG
The other day, I decided to reverse engineer the TI BASIC pseudo-random number generator. I was curious to see what sort of algorithm it used, and I couldn't find such an analysis elsewhere on the internet. I've read the book "TI 99/4A Intern" by Heiner Martin (I'd recommend it to any TI enthusiast), and it provides a ton of useful insight into the inner workings of the BASIC ROMs. However, I wanted to reverse engineer the algorithm myself, without the comments from the book.
Source code of my C implementation of TI BASIC's PRNG with test data can be found: here. Below is an explanation of the exact routines: Tuesday, August 11. 2009The smallest Winblows program I ever wrote
Tonight, while being bored, I actually wrote a Winblows program. I might be losing my mind, but I can say one good thing about it. The size of the code + data is well under 100 bytes. I believe this would qualify as one of the smallest Win32 programs in existence. At least no one can ever say I never wrote a Winblows program.
Download it here. Saturday, April 18. 2009From Nigeria With Love...
Recently, I've been getting marked by a whole slew of would-be con artists from Nigeria, so I decided to go looking for one. I just think it's more than hilarious to see how long I can draw it out, and sell them a complete load of bullshit while convincing them I'm buying theirs.
I'm sure you've heard the stories: "I need $nnn to be able to come see you because I 'lost' my passport/purse/etc.", "I'm head over heels for you, and I want to come see you, but I'm in Nigeria.", etc. The practice seems to be all too common, and what's even more comical is the amount of idiots that fall for their bullshit. Hook, line, and sinker. Regardless of the game, there are some common elements: 1. Their grammar is atrocious, even though they're "originally from America." 2. They want money, although they just "met" you. 3. They send you pictures either acquired from another mark, or typically, internet porn models. You just have to fall for them, right? 4. They're terrible liars, and even worse salesmen. 5. They always want you to send the money via Western Union, or some other traditionally insecure means. I'll post some highlights from a rather memorable experience I had with one of them just the other night. Tuesday, March 24. 2009Control Software for the Inland USB LED Badge![]() Update 12/14/09: I've moved the code for this program to GitHub and now provide binary packages. See the README for details. I bought one of these at Micro Center a couple of weeks ago (I just now got around to posting the code -- I've been busy with a few other things) because I wanted to flex my reverse engineering muscles, and work with libhid. I knew there was no way in hell it would come with control software for Linux, and at $14.99 it was quite affordable. 0x04d9:0xe002 USB Vendor ID: 0x04d9 Holtek Semiconductor, Inc. USB Product ID: 0xe002 FURI KEYSHINE USB LED Badge You can download the source here. The program is written in C, and licensed under the GNU GPLv3. Instructions for how to compile the program are included in the README. You'll find the original documentation (converted to PDF) in the doc directory. Please make sure the badge is connected before running the program. Requirements: - GTK+ >= 2.14 - libusb >= 0.1 (Legacy version - libusb 1.x has a much different API) - libhid >= 0.2.16 - pkg-config, GLib/GDK/GTK+ headers, libusb headers, libhid headers, etc. Upon starting the program, you'll see the following window: ![]() If you've used the manufacturer-supplied Delphi progam, then this should seem fairly familiar. If not, it should be fairly obvious what each field is for. The first four fields are text input fields corresponding to the first four messages that can be stored on the device. You simply enter the text you want, choose a speed (the higher the number, the faster the action happens), and an action (e.g. "Move.") The final two fields are for the two bitmap messages available on the device. If you click on the image, a bitmap editor dialog will appear: ![]() By clicking in the grid, you can set or unset the pixels that comprise the image displayed. If you right click on the grid, you'll get an option to clear the bitmap. When you're done with a bitmap, close the dialog. The last input item is the "Luminance" spin button. This will set the luminance (intensity) for the LEDs. The default is usually sufficient. When you click "Send," the data will be sent to the device, and you'll be ready to disconnect the device and use it. Friday, March 13. 2009My GED Scores
The minimum passing score in each section is 450 (technically 410, although a 450 average in each section is required to pass the test as a whole.) The maximum score is 800 for each section, and the absolute minimum is 200. A score of 450 - 500 is representative of the average performance of graduating high school seniors. The test is devised so that 60% of high school seniors would fail the GED on their first attempt. Rank is, presumably, the percentage of graduating high school seniors across the entire US that would score lower than I. Bear in mind, I've been out of High School for five years now. I don't believe a GPA could be extrapolated based upon the scores, however the most logical way would be to use the average score. Thus: 660 / 800 = 0.825 * 4 = 3.3 (on a 4.0 scale), or 4.125 (on a 5.0 scale) If you go based on the average rank, it'd fall somewhere between 3.7 and 4.0. Saturday, October 11. 2008On Paltalk and Gaim-PT
Just the other day, I was contacted by Mohammad Ebrahim Mohammadi Panah who setup a wiki and has been attempting to document the Paltalk protocol. Upon his request, I contributed the gaim-pt source code for use in his documentation efforts.
You can find the gaim-pt related info (including the source code): here. Friday, July 18. 2008Finally, a new system!
I've finally managed to put together a new system. Compared to my previous system, it's like lightning.
Without further adieu, here are the specs: CPU: AMD Phenom X4 9850 (Black Edition) RAM: 4 GB DDR2-800 (2 x 2 GB Corsair XMS2) HDD: 160 GB Western Digital Caviar Blue (7200 RPM, SATA-II, 16 MB cache) Video Card: NVidia GeForce 8400 GS (PCI-e) Sound Card: Onboard NVidia HDA Motherboard: ECS NFORCE6M-A (3.0) Chassis: Gigabyte GZ-X2 Mid-Tower PSU: Coolmax V-500 (500W ATX PSU) OS: Gentoo Linux 2008.0 (amd64) This really is a system to Git-R-Done! Thursday, June 5. 2008Skunk-a-what?
Those of you in the Fairfield / Hamilton / Middletown areas of Ohio are probably familiar with a computer shop by the name of Skunk-a-Rific Computers. A friend of mine recently had a laptop serviced there, and after being charged approximately $75, was told that his laptop was "a lost cause."
In utter disbelief I examined his laptop, and what I found was: not only were they dead wrong, they caused an ID10-T error. Skunk-a-Rific also installs a default background image which I can't stop laughing at (click to see the full image, and take note of the text in the lower-left corner): Your software warranty is void if you load any software without our approval. This includes: Windows Updates, drivers for anything, all software loaded from the internet, internet access discs, store-bought software, or anything that modifies Windows. Do not use Internet Explorer to browse the internet, use Mozilla Firefox instead. Do not use AOL for internet access. It is not approved by Microsoft or us. If you normally use Outlook Express for e-mail, use Mozilla Thunderbird instead. You will get hacked if you ignore these instructions, and this is not covered under our warranty. What kind of fear tactics are these idiots trying to pull here? Sounds like a mandate from a fascist regime. One should need their approval to install something? That's absolutely rediculous! Thus, I went down into my dark chambers, and began the process of reinstalling Winblows. After an hour or two, I still had not had any problems (the laptop is supposedly "a lost cause" right?) My friend had told me he only really wanted the machine to play World of Warcraft, so I installed the trial, and it ran smoothly. Now, the fact that the technician at Skunk-a-Rific completely lied to my friend wasn't my chief concern, their unprofessional nature speaks for itself. It was more the fact that they would have installed several different pieces of software on his machine, without his approval, and then proceed to chastise him. I found several OEM versions of softwares such as AHead's Nero CD-recording suite, for which my friend did not pay, nor have a license; again, installed behind his back. Now, let's run through a check list: 1. Did they properly assess his needs? -- No 2. Did they have a professional attitude toward their service? -- No 3. Did they do what he originally asked (Reinstall Windows)? -- Partially 4. Did the customer pay for an unsatisfactory job? -- Yes 5. Are they even CompTIA A+ Certified? -- More than likely not. That says it all. Even on their website, are several examples of unprofessional conduct by their employees. For Christ's sake, their website is one big sales pitch from the late 90's. It's not even informative, except for bashing this and that, selling this and that. Their company MySpace page feels more personal than professional. They seem to love to push Linux and Open Source software, but they are exactly the kind that give the Linux & OSS communities a bad name. As much as they seem to hate Windows -- their website and their offices are run on Windows servers. Quite a bit of irony, eh? If you're in the Cincinnati area and need computer repair, contact me for a quote. I'm a real CompTIA A+ Certified Technician and a professional to boot. Saturday, April 12. 2008Card Trick '13' Explained
I saw a card trick on YouTube amongst my late night YouTube surfing, and thought to take a moment to give an explanation as to how it works. It's not an illusion of any sort, no slight of hand is involved. It's simple mathematics.
The trick relies on one thing: The cards for each suit are ordered, thus the n+13 th card in the deck is the card n of the next suit. Cutting the deck doesn't change the order of the cards. If I have an array of ( 1,2,3,4,5,6,7,8 ) and I 'cut' the array at 4, my array is ( 5,6,7,8,1,2,3,4 ) thus the elements are still ordered. Flipping the deck over only affects the order in which the suits present. It also does not matter that the cards are ordered king-to-ace, ace-to-king, or 10-to-ace-jack-to-king, etc. as long as they are in the same order for each suit. I wrote a perl script to illustrate this, exactly as the feller does it in the video. I posted a video response on YouTube. Sunday, March 30. 2008Benchmark: PHP vs. Python vs. Perl vs. Ruby
Today, I was looking at a couple of PHP benchmarks (the one here for example), and they compared OOP benchmarks to Procedural benchmarks for the most part. I decided to write my own set of benchmarks using four of the most well-known web development languages that were ready-at-hand: PHP, Python, Perl, and Ruby. My benchmark also tests OOP vs. Procedural on a few terms: Execution speed and Raw lines of code written. I compare a visual estimate of memory usage between all four languages as well.
Now, one cannot draw very many conclusions from my benchmarks here, because the programs used don't really do anything useful, nor do they simulate "real-world" conditions, or practical use-cases. Remember, we learn multiple programming languages, not because of fads, but because it expands our own knowledge, and because some languages are better than others for some things; and it's helpful to be able to choose the right tool for the job. Keep in mind the golden rule of benchmarking: All benchmarks are flawed benchmarks. Friday, March 28. 2008Geert Wilders Releases 'Fitna'
As many of you are undoubtedly aware, today Dutch politician Geert Wilders finally released his controversial film entitled Fitna.
Fitna is an arabic word, which roughly translates to "strife" (usually used to indicate religious strife) according to what I've read (I don't speak Arabic.) After seeing the film, I think the title is quite fitting. The film contains highly graphic images, which some may find objectionable. However, the film is based on a few passages out of the Quo'ran, and on news reports of terrorist attacks by radical islamic groups in the US and Europe. This film has the potential to be taken largely out of context. Some people claim that the film could incite islamophobia, much like The Passion of the Christ could incite antisemitism. From my perspective, the film is not anti-islamic, but bears a warning against the spread of radical Islam, and the agenda of its proponents. Personally, I have a lot of respect for Muslims and their culture. Every Muslim I've ever met has been pleasant to talk with and open-minded. By no means are the majority Muslims "radical", but I must concur with Mr. Wilders that radical Islam must be stopped. Much like the Catholics did during the Crusades, radical islamists use their religion to justify murder and other terrorist actions against innocent people. This is the sort of film that one must judge for oneself. It certainly makes one think. As for Network Solutions taking Wilders' site offline the other day, I'd say that Mr. Wilders has just as much a right to free speech as the islamic extremists on behalf of whom NS was all too happy to play host. NS should grow a pair and take a stand in favor of freedom of speech. To the broadcasters who wouldn't air his film: Grow a pair. Edit: 3/30 It appears that LiveLeaks has removed fitna, and replaced it with a statement as to why. Moreover, the English version of Fitna is still able to be seen at: Google Video and fitnathemovie.com. Fortunately I have a copy of the Dutch version which I may host here on my server. Wednesday, February 20. 2008Yahoo and Microshaft -- a shotgun wedding from hell
By now, I'm sure everyone's heard about the M$ - Yahoo acquisition offer. I'd been following it since day one. Though, thankfully, Yahoo's board was smart enough to refuse the offer, though I would say that given conditions at the time, it was a generous offer.
In the wake of the whole situation, I've found a blog post that really hit home. Nick, a Yahoo employee, made some very interesting points on his blog post entitled "Yahoos won't work for Microsoft". In said post, he postulates that many Yahoo employees would have left had the deal gone through. That was something that I, too, had surmised. What really hit home most of all was one single line: I love Yahoo!, and I am proud to be a Yahoo! I will not work for Microsoft. I’d be embarassed to admit that I worked for Microsoft, and having it on my resume would be detrimental to my career. That is a point that echoes what I have said for the last 8 years. I will never get a Microsoft certification, because we all know, an MCSE is like a broken condom - 99.9% ineffective. Granted there are some MCSEs who were forced into it, and are actually halfway-decent engineers (hence the 0.1%), and I cannot find fault with those people. Moreover I, myself, will never join their ranks. Sure, I could go off on the whole "What comprises a true engineer" rant, as I normally would, but that would go way off topic for this post. I, myself, will never work for Microsoft, or any company they acquire; nor will I ever utilize any Microsoft technologies (beyond what I need to reverse engineer things in order to write open-source equivalents.) To do so would be utterly shameful, blatant abandonment of my principles, and absolutely unforgivable. Microsoft's closed-minded way of thinking is so absolutely backward from today's industry, that it really makes you wonder how long true developers will allow themselves to be suckered into it. The only companies that push Microsoft products / technologies are those looking to either make a quick buck, gain revenue from support contracts after the fact (because it's going to break -- either by programmer error, system error, or user error), or have their heads crammed so far up their asses they haven't been out to see what the state of the industry currently is. Open-source represents the epitome of collaborative development -- an absolute necessity in today's industry. A developer can learn more, by participating in open source projects than from a year of college taking (mainly) Microsoft-oriented classes. The unique element to the open-source model is collaboration with any number of developers across the globe, all with different levels of experience and different backgrounds. Keep in mind, you can write open-source code for Windows, but, why limit yourself? Kudos to Yahoo for rebuking Microsoft and standing up for the creative minds they've employed, and also for their shareholders, whom M$ would have simply written off. Tuesday, January 29. 2008PSX-GS 1.0 Released
Today, I'm releasing PSX-GS -- a plugin for epsxe and other PSEmu-compatible emulators on Linux to allow the use of Game Shark / Pro Action Replay codes. Winblows users have had this functionality long enough!
PSX-GS is licensed under the GNU General Public License (version 2) (or later), and has been tested with epsxe 1.6.0. You'll need a fairly recent GTK 2 build in order for the UI portion to work properly. Note that codes with correct formatting and improper addresses may crash the emulator. Be sure to read the README. You can download it here: Source Code, 32-bit x86 Binary Here's a brief walk-through of how to use it. You can watch the YouTube video I made about this plugin here.
(Page 1 of 2, totaling 23 entries)
» next page
|
Calendar
Links
Contact Me
QuicksearchSyndicate This Blog |