I’ve reviewed lesson 1 of Satish Talim’s Ruby course, along with Yukihiro Matsumoto’s “The Philosophy of Ruby” interview. The most difficulty I had was with the modulus operator, which I posted about yesterday. I also learned that Google Calculator is incorrect in its calculation of the number of seconds in a year! Always make sure you check, double-check and triple-check your sources when you are declaring constants in your programs.
To make sure I have a solid understanding of the fundamentals of Ruby, I am going to read Chris Pine’s “Learn to Program” within the next couple of days. It seems to be mentioned everywhere I go, so it must be good. After that, I am going to start reading “The Ruby Programming Language“, which I purchased in PDF form the other day. That should be a good start.
Before I get too tired, I am going to listen to Geoff Grosenbach’s Ruby Basics.
That’s about it for today. I’m back at work this week, so time is a bit limited.
P.S. I am really liking ScribeFire for posting blog entires within Firefox.
Technorati Tags: ruby, programming, blog
Tags: programming · ruby
I found the modulus operator in Ruby to be quite different than Java. I think it worked the same way in Python, but I can’t remember.
I found a relatively easy way to figure this out for negative numbers:
When the second operand is positive:
-12 % 4 = 0
-11 % 4 = 1
-10 % 4 = 2
-9 % 4 = 3
-8 % 4 = 0
-7 % 4 = 1
-6 % 4 = 2
-5 % 4 = 3
-4 % 4 = 0
When the second operand is negative:
-4 % -4 = 0
-5 % -4 = -1
-6 % -4 = -2
-7 % -4 = -3
-8 % -4 = 0
-9 % -4 = -1
-10 % -4 = -2
-11 % -4 = -3
-12 % -4 = 0
So basically, when the first operand is positive, the number returned gets larger as the first operand gets larger. When the second operand is positive, the number returned gets smaller as the first operand gets smaller.
This should make it a bit easier to learn what the heck Ruby is doing!
Technorati Tags: ruby, programming
Tags: programming · ruby
I set up Twitterfeed for my blog so that my blog updates will go straight to Twitter. It’s set to update every 30 minutes.
Tags: geek
Tags: gaming

How to Play Call of Duty 4 on Veteran Difficulty
from wikiHow - The How to Manual That You Can Edit
Ever wanted to play Call Of Duty 4 on veteran Difficulty but backed down because you heard how hard it is? Well if you read this guide and follow these skills you just might get those achievements you want so bad. (This guide is intended for the Xbox 360 version, PS3 and PC versions may vary)
Steps
- Always reload when you can. If you don’t have a full mag and you go running into combat you’re either really dead or really lucky 90% of the time it’s the first one. Reload when you can so you don’t have to do it in a combat situation.
- Take cover. The most basic rule of modern combat, if you don’t take cover you’re going to get hit and if you get hit in veteran for more than 1 second than your going to see yourself collapse to your side and some quote about war. Don’t choose the flimsy cover like plywood, sheet metal, behind cars, glass and furniture. In COD 4 they use a system where these more traditional covers in other First-Person-Shooter games become obsolete and are penetrable and flimsy. So bottom line walls, trees, buildings and some other items are the only useful cover you can find. If you don’t choose your cover right the first time than well, try something else the second time.
- Go Prone. If you go Prone and slowly edge around your cover than the terrorists hardly notice you assuming that the enemy is at eye level, so take advantage of this weakness.
- Shoot in controlled Bursts. Fully automatic fire, like in real life gets inaccurate and is a waste of ammunition, but controlled bursts aimed correctly at the head are far more effective. Use your reflex sight to get a shot then pull back the trigger and quickly release it to fire a burst.
- Throw back Grenades. Something that Call of Duty 4 lets you do that other games don’t is the option to throw back Fragmentation grenades, so your oppositions friend becomes their enemy. Always try to throw back grenades other wise they may explode and you get severly injuired or worse killed. On veteran difficulty the terrorists almost have an infinite supply of these bad-boys so don’t be afraid to throw ‘em back.
- Flash-Bang grenades. Using a flash-bang grenade is very useful when you want to stun enemies, clear a building, stun enemies then run or just to use them as a decoy. Flashbangs are non lethal so they don’t kill but they blind and deafen enemies temporaily so you can go in for the kill. When use in conjunction with a shotgun it’s quite deadly.
- Pistol and Knife. Besides your primary weapon you have a secondary and a melee weapon. switching to your side arm or secondary weapon is always faster than realoding your primary. The pistols in this game pack a major punch and one head shot can be fatal. There have been people that can mow down an entire enemy squad with a pistol. The knife is a melee weapon that kills in one hit. Keep in mind when you finish your knifing motion than your weapon won’t avalible for a second and thats all it takes for the terroists to neutralize you.
- boom, bang. There is a variety of explosives in COD 4. ranging from the frag grenade to the airstrike. The only problem is how to use them correctly. The frag grenade is mainly used to clear buildings and can ruckashay of a wall. The M203 grenade launcher can be use on infantry, to a deadly effect or on a troop landing helicopter which destroys it and leaves fewer troops for you to fight.
- Snipe. Sniper Rifles can be found in numerous positions around levels and using one is easy and can take out multiplte squads. The best thing to do is go prone in a hidden area and start using headshots.
- Know when to retreat. Remeber that message you recieved on the first mission of COD 4 “Your Hurt! Get to Cover (call of duty 4 instruction)!” yeah you should follow that here as well because checkpoints are hard to find so dying isn’t the ideal thing to do.
- Pulling and Releasing. There is a snaping to enemy feature in COD 4, like past Call of Duty games. Pulling on left trigger when aiming near an enemy will get you an automatic aim at them giving you a great opurtunity to kill. Doing this on multiple enemies a great way of neutralizing a squad.
Tips
- Some missions are harder. So don’t expect the same amount of troops on every level.
- Patience. If you don’t have it don’t play, because Call of Duty 4 Veteran difficulty is very frustrating and even in some cases the controller and TV screen became friends. Or in other words you chuck your controller in to the screen out of frustration.
- Play on other difficulties first. If it’s your first time your not going to survive very long.
- try a different control scheme. Sometimes the default control scheme may not be the best. Try a couple of different ones to see if you like those better.
- Change the sensitivity. If you turn up the sensitivity it will become more responsive, just keep in mind a higher sensitivity isn’t necessarily better.
Warnings
- Don’t get too into the game, you can get addicted.
- Don’t get frustated, even the most patient players have reached high levels of frustration.
Things You’ll Need
- Xbox 360
- Call Of Duty 4: Modern Warfare
- Xbox 360 controller
- A Television set.
Related wikiHows
Article provided by wikiHow, a collaborative writing project to build the world’s largest, highest quality how-to manual. Please edit this article and find author credits at the original wikiHow article on How to Play Call of Duty 4 on Veteran Difficulty. All content on wikiHow can be shared under a Creative Commons license.
Tags: gaming
Kabateck Brown Kellner has filed a federal class action lawsuit today against Apple over their 20-inch iMac displays. What’s the problem with the displays? According to the suit Apple has been marketing the displays as being capable of displaying millions of colours when they are only capable of displaying 262,144. The previous version of the 20-inch (and current version of the 24-inch) iMac displays are capable of displaying 16,777,216 colours. The suit also states that the new 20-inch iMac display is unsuitable for video and photo editing.
The new 20-inch iMac display is Twisted Nematic (TN) as opposed to the 24-inch display which makes use of Super Patterned Vertical Alignment (S-PVA). TN displays can do 6-bits per pixel. S-PVA can do 8-bits per pixel. TN makes use of dithering which is a sneaky technique that attempts to trick the eye into thinking it sees 8-bits. Many people who work heavily with video or photography really dislike the dithering technique used by TN displays. In addition to the lower number colours that can be displayed, TN displays have narrower viewing angles. So why use TN displays if they are not quite as good as S-PVA, you ask? Because they are cheaper.
LOS ANGELES, March 31 /PRNewswire/ — Apple deceptively marketed its new 20-inch iMac in a way that grossly inflated the capabilities of its monitor, which is vastly inferior to the previous generation it replaced, according to a federal class action lawsuit filed today by Kabateck Brown Kellner, LLP.
Source: PR Newswire
Tags: apple · geek
Tags: gaming · video
March 27th, 2008 · 1 Comment
Our friends at Azureus have released a plugin to detect when your ISP messes with your torrents. I personally believe that ISPs have no business in telling you what protocols you are allowed to use. BitTorrent can be used for legitimate purposes, but even what you’re doing is not legit, it’s not your ISP’s place to put you over their knee and spank your bottom.
This plug-in works with your Azureus (Vuze) application to gather information regarding interference with your Internet access and send it to Azureus (Vuze).
Specifically, this small piece of software monitors your network connections and every ten minutes measures the number of interrupted connections (called reset tcp connections) and then displays the results to you. By selecting the share results check-box you can also share these results with our central server, which enables us to then aggregate the results and compare them with customers of other ISPs. We strongly encourage you to mark the share results setting.
Read more.
Technorati Tags: geek
Tags: geek
True, but the things they talk about sure make them geeks!
Mythbusted – people who wear glasses aren’t geeks
Media Release, Wednesday 26 March 2008
Latest research into myopia or shortsightedness reveals that people who wear glasses are not stereotypical geeks or nerds.
“We have literally busted the myth that people who wear glasses are introverted or have particular personality characteristics. They are more likely to be agreeable and open, rather than closed and introverted,” said A/Prof Paul Baird of the University of Melbourne’s Centre for Eye Research Australia.
Geeks!
Tags: geek
March 27th, 2008 · 1 Comment
LOL … this must be out of 100.

Tags: funny · geek