Posts tagged with ‘ruby’

 

I love it when a software has a good and catchy name but I love it more when a software has a name that looks funny in the a Linux install command:

$ sudo gem install god

A Better Way to Monitor

God is an easy to configure, easy to extend monitoring framework written in Ruby.

Keeping your server processes and tasks running should be a simple part of your deployment process. God aims to be the simplest, most powerful monitoring application available.

God is useful, learn more about god.

 

Recently, due to my Java class, I’ve been typing parseInt() in my PHP code instead of intval().

Here is a compilation of all sorts of ways to parse string into integers:

PHP

var $num = intval("0001");

JavaScript/ActionScript

var num = parseInt("0001");

Java

int num = Integer.parseInt("0001");

Apparently you need to type really long to parse stuff in Java.

Python

num = int("0001")

Ruby

num = "0001".to_i

Now that I suddenly remember them all, I decide to quickly write them all down. Because the next moment, I’ll forget them or mix them up again. Please correct me if I am wrong.

 

I’m losing patience with Media Temple. I pay around 20USD per month for Media Temple’s Grid-Service and I’m starting to wonder if it’s just some sort of a marketing thing. They made it sound so reliable and blah blah but in reality it’s feels kinda slow. Media Temple serves huge files pretty quickly. Unfortunately, when it comes to responding to requests, they seem slowly than other web hosts.

Anyway I filed a support ticket complaining that their database seemed problematic.

My support ticket on 2008/03/31 11:28

I get this Error establishing a database connection.

And I can’t access phpmyadmin, it says too many connections. What’s happening?

The database seem to be problematic…

By the way, Firefox’s dictionary suggested ‘phpmyadmin’ to be corrected to ‘badminton’. And this is the reply I get from them. Basically, they’re trying to get me to pay more money again.

Support response on 2008/04/01 20:39

Sorry for any inconvenience that you may have experienced by this. We also apologize for any lack of information provided to you. I’ll try to explain the best that I can.

Essentially you are in a shared server environment. The (gs) Grid runs off of a cluster of servers and provides resources to multiple users at once. In that, you also share database servers and the resources provided. When a “Bad Neighbor” performs some sort of unauthorized action, such as running scripts or queries that are configured to run for long periods of time and consume large amounts of resources.

When you are receiving the “too many connections” error, this means your are experiencing the “Bad Neighbor Affect”. Meaning that someone else has caused the server to reach a high load. When this happens, the database is isolated and that particular “Bad Neighbor” is bumped off of the database server and notified of their actions. During this time is when you are receiving the error. Once everything is resolved the database is restored and accessible again. (more…)

 

Okay, as I was saying, my computer’s getting kinda cluttered and things are just getting harder and harder to find. I use Windows Vista Business, I have multiple copies of Apache, MySQL, Ruby, PHP and other this sort of programs in my computer. If you don’t know what they are, you probably wouldn’t like my blog, maybe you’d be better off at BoingBoing or watching some inspiring videos at TED.

The problem with having multiple copies is that you don’t know when to launch what. Every time I want to - say - launch MySQL, I start thinking really hard which folder should I go into. And when my mind is kinda switching off I often find my mouse pointer moving towards Safari browser icon and visiting Digg.com. Counter-productivity at the very best or worst - you decide.

I always tell myself, okay, next time when I re-setup my computer I’ll do this and that and so on… Each time I re-setup my computer, I always find a flaw with my existing setup. I will restructure my folders again, partition things differently this time. And I always have this optimistic thought that this time I’m really getting it right.

I rarely do. Two months later I would look back at my system thinking of new ways to refine my setup for the future.

Maybe the problem isn’t with me. Maybe the problem is with just the way computers are. All these labyrinth-like hierarchy of folders, it’s more messy than my family tree. Some day, we should kill the ideas of folders, they’re a good way of organizing things but today with people storing more and more files, the concept of folders is hardly a good idea.

 

WordPress powered and Django inspired.
Love and elephants come after.
RSS: Posts and comments.