Entries in the ‘Technology’ Category:

Perl’s Join Function


Reading other people’s code can be quite revealing at times. Having recently started a new job, I get the daunting (… or delightful?) task of diving into unfamiliar, pre-existing code. A new experience for me, and one that has helped me grow much in the last couple months.
 
The Perl join( ) function is a perfect example.
 
In the past, I would manually loop through all the elements, concatenating the delimiter inside the loop.
 

Then I would chop( ) the last delimiter off the end, like so …

my @rray = qw(Joe Nancy Brett);
my $tring = “”;
 
foreach my $name (@rray) {
$tring .= $name.”,”;
}
 
chop($tring);

… when all along, the same job could have been executed with two lines.

my @rray = qw(Joe Nancy Brett);
my $tring = join(‘,’,@rray);

A little more time invested in manual reading might be well-spent. :~/

Tags: , ,

Leave a Comment

Bloodsucker Attack

I’ve started playing the S.T.A.L.K.E.R. series again, but this time I’m playing it in chronological order (starting with Clear Sky). I’m also playing this round with the Complete mods, which are the best mods I’ve tried for the S.T.A.L.K.E.R. series. Call of Pripyat Complete is currently in progress, and I’m hoping it will be finished before I finish the first two games. It seems likely, since the time I can devote to gaming is ever dwindling.

Farewell, my clear sky brother … who often rudely suggests that I bugger off with my questions.

Tags: , , , ,

Comments (3)

S.T.A.L.K.E.R. 2 in Development


Stalkers in Zaton (Call of Pripyat)

I just read the news, and couldn’t be more happy.

GSC Game World announces S.T.A.L.K.E.R. 2 – the official sequel to best-selling game series – in development now. A completely new multi-platform technology developed by GSC will make the core of the game.

“After the official sales of the series exceeded 4 million copies worldwide, we had no doubts left to start creating a new big game in the S.T.A.L.K.E.R. universe. This will be the next chapter of the mega-popular game players expect from us” – said Sergiy Grygorovych, CEO of GSC Game World.

The game is scheduled for release in 2012.

2012 gives me enough time to beat the previous 3 games released in this series on Master skill level (although on Clear Sky and Call of Pripyat, this would be considerably hard for me).

Tags: , , ,

Leave a Comment

How to Fix Ubuntu 9.10 Wubi Install after grub Update

After a great month of smooth running, it happened again. Wubi is a great way to install Ubuntu if you would like to keep your Windows partition intact, but this seems to happen to me a lot. Basically, you install it. It works lovely. You install updates, including a grub update at some point. Then, next time you try to boot into Ubuntu, grub can’t find the menu, and you are left at a grub prompt.

sh:grub>

In order to boot into Ubuntu, you will need to enter the following into the grub prompt (press the tab key to auto fill or see which kernel versions are available):

Find/set the kernel image:

linux /boot/vmlinuz-(Your kernel version) root=/dev/(Your windows partition) loop=/ubuntu/disks/root.disk ro

Set initrd:

initrd /boot/initrd.img-(Your kernel version)

Then boot:

boot

It’s great that you can get back into Ubuntu, but now you will have the same problem every time you boot your computer. In order to fix this, you need to make sure grub is installed correctly. It was for me, but just in case, you can just reinstall it through Synaptic Package Manager (System->Administration->Synaptic Package Manager. Do a search for “grub”). I did this, but I don’t think it was necessary. After that, I simply updated the grub menu.

sudo update-grub

I’ve booted into Ubuntu several times since this procedure with no problems. Here is another link that was helpful for me.
https://wiki.ubuntu.com/Grub2

Tags: , , ,

Leave a Comment

Top 5 Web Browsers Tested

All five of these browsers tend to do a lot of boasting (Internet Explorer, Firefox, Safari, Opera, and Chrome), but how can you know which one really is the best, or the fastest? Thorough testing, as is often done by Tom’s Hardware, can be a valuable source of information. Personally, I tend to alternate between Firefox, Chrome, and Opera. I love Firefox for its stability, support, and plugins; Chrome for its simplicity and speed; and Opera for its speed and its unique set of features. I really don’t care about Internet Explorer or Safari. I’ve tried both on numerous occasions and have nothing positive to say about either one.

For detailed results of Tom’s Hardware set of tests, check out the full article.

Tags: , , , ,

Comments (3)

Ubuntu and Wubi Pains

I’m not sure how many releases back this started, but Ubuntu has apparently been offering an installation choice that allows you to skip out on partitioning your hard drive. Ubuntu can be installed and uninstalled like any other application in Windows. This is done through using an installer called Wubi, and is amazingly easy and hassle-free to set up. Once installed, you simply reboot and then you can choose which operating system to boot into, Windows or Ubuntu.

My problem with this so far has been that any time I install the initial group of updates for Ubuntu, I completely loose everything after I reboot. Either the grub menu doesn’t exist anymore, or it can’t find the right location of the kernel. The first time I installed through Wubi, it automatically used the latest 64-bit version of Karmic (9.10), which worked fine after the updates, but ultimately had some intolerable bugs and conflicts with software I use. Normally I just use the live cd to fix booting issues, but that won’t work in this case.

Hopefully I can find a solution to this soon, because I consider this installation method, if working, to be one of the coolest things I’ve found this year to date.

*UPDATE: It turns out, fourth time’s a charm. I installed the 32 bit version and successfully updated all packages on my fourth try. I installed restricted drivers, used it for a day, then installed all the updates as soon as the update manager popped up. After reboot, my grub menu and everything was still there. Victory.

Tags: , , ,

Leave a Comment

S.T.A.L.K.E.R.: Call of Pripyat Released

Call of Pripyat, the third release in the S.T.A.L.K.E.R. series has finally been released in the US. I’ve been impatiently anticipating this release for a long time. The first two in the series, Shadow of Chernobyl and Clear Sky, while requiring more costly PC hardware, have made a huge fan out of me.

The S.T.A.L.K.E.R. series, if you haven’t played it, is a survival first-person shooter experience that takes place in the exclusion zone which was created by horrific Nuclear Power Plant explosions in and around Chernobyl, Ukraine. What really stood out and sucked me into this game, apart from its plot, was its realism and vivid atmosphere. While playing, you feel like a vulnerable human who runs into trouble with jammed guns, bleeding wounds, and energy-draining hunger. The length of time you can run will depend on how much weight you have in your backpack–which is filled with your weapons, ammunition, food, medication, bandages, and artifacts (highly valuable radioactive rocks that you can either use for their physics-defying properties or sell for large sums of money). All of this is before we get into the affects of radiation, anomalies, and numerous other dangers that reside in the zone’s environment. In order to survive you will also need to loot various buildings, stashes, and yes, even corpses. Advice to first-timers: learn the keyboard shortcuts (especially for quick-saving), otherwise you will die … very often.

The player will also interact with many NPC characters who belong to various waring factions in the zone, and who also exhibit impressive AI capabilities. In the second installment, the prologue Clear Sky, it becomes possible to join these factions and carry out faction-specific missions and objectives. For the most part, it is an open-world game where you can find much to do and explore without following the story’s main objectives. I found this non-linear approach very refreshing. However, I would be remiss if I were to avoid mentioning the unique and humorous bugs that have plagued these games. Patches have fixed many issues, but be forewarned, you will see glitches and oddities on occasion. Without patches, these games have been notoriously so plagued with bugs, that it becomes difficult or even impossible to accomplish tasks and missions. Call of Pripyat has been rumored not to have this problem.

A copy of Call of Pripyat is currently heading west in a UPS truck, and is due to be delivered to my house in a couple days. I will update you with a fresh review once I’ve had sufficient time to play it.

Tags: , , , ,

Leave a Comment

Firefox 3.6 Released

For the sake of honesty, you should know that I’m a geek. I often get excited about new software and hardware releases. Firefox of course, is one of the best things to ever happen to Internet users. If you haven’t used it yet, I just don’t know what to say. You would have to be either really behind the times, or technologically inept. That said, there are also several other browsers that are great and have my recommendation as well (i.e. Opera and Chrome). It never hurts to have multiple browsers installed (I always do).

Now, the newest release of Firefox is purportedly 20% faster than the previous version 3.5, which was already pretty fast, especially when compared to Internet Explorer. From watching the new features video, Firefox has also now integrated one of its most popular add-ons, Personas, which is a visual theme editor that has thousands of options for changing the look of Firefox. Customization and great add-ons, like Firebug and Fire Gestures, are some of the reasons I’ve used Firefox so long, and why I will probably continue for a long time to come.

Tags: , , , ,

Leave a Comment