• Home

CodingExperiments.com

$ sudo make money

Search

Category:

  • Apple Inc.
  • Facts
  • Fun
  • Google
  • Google Android
  • Ideas
  • Internet
  • Linux
  • Microsoft
  • Programming
  • Rants
  • Security
  • Uncategorized
  • web 2.0

Archives:

  • April 2010
  • August 2009
  • July 2009
  • June 2009
  • May 2009
  • April 2009
  • March 2009
  • February 2009
  • January 2009
  • December 2008
  • November 2008
  • October 2008
  • September 2008
  • August 2008
  • July 2008
  • June 2008
  • May 2008
  • April 2008
  • March 2008
  • February 2008
  • January 2008
  • December 2007

Pages

  • About
  • About
    • The Authors
  • Commenting your code
  • How to Write Papers with Groff
  • ModCMS Anti-Spam Component Set
  • ModCMS Technical Specifications
  • Regular Expressions Guessing Game
  • Saving code directly to a web server
  • The (Almost) Perfect PHP 404 Page

Meta:

  • RSS
  • Comments RSS

Awesomeness tracker

CodingExperiments at Blogged View blog authority
Free Page Rank Tool

Which Linux Distributions Are Dying?

June 30th, 2008 by Rishabh Mishra

I just read Louis Gray‘s post titled “On the Web, If You’re Not Growing, You’re Dying.” It gave me a chilling realization about web services. Like everything else, what goes up must come down. This must apply to Linux distributions too, right? So, what’s happening with Linux? Which distributions are growing? Like Louis Gray, I’m going to use data from Google Trends. People searching the name of Linux distributions on Google can be considered new users. After all, wouldn’t experienced Linux users already know where the websites of the big Linux distributions are?

Let’s start out with Debian. I’ll note here that if you want to see the Google Trends search results, and not just the screenshot, you can click on the images.

Debian is slowly declining. Has its time passed?

What about Red Hat and Fedora?

Both Red Hat and Fedora are declining, but Fedora has some huge spikes on new releases.

I’m a big OpenSUSE fan. How’s that doing?

While the name SuSE is being searched less, the name OpenSUSE is growing. Searches of OpenSUSE should overtake SuSE pretty soon.

Now, I remember going to Slackware after trying OpenSUSE 11. How’s that doing?


Of course, I didn’t really expect Slackware to be growing.

Now, I’ve been saving the best one for last. What does Ubuntu’s graph look like?

Of course Ubuntu is growing rapidly. What else would you think? But here is where things get shocking.

That’s right. Ubuntu looks like it’s almost ready to overtake Linux as a search term.

So, what does this tell us? First of all, Ubuntu is pretty close to being considered the face of Linux. Second, it’s the newer distributions like Ubuntu, OpenSUSE, and Fedora that new Linux users are going for. Of course, it’s mainly Ubuntu, but I believe that there could be plenty of new users arrinving at the Fedora and OpenSUSE communities if both distributions work hard to become more user friendly.

So? What’s going to happen to the distributions like Debian and Slackware? I’ll leave that to you.

i80and’s EDIT: While it is true that Ubuntu is increasingly becoming Linux to many people, DistroWatch.com shows that not all is doom and gloom for the “classic” distros; Slackware had been on a rise for the past 6 months as of 07/01/08, as has Debian. However, broadening the statistic query to the past 12 months unsurprisingly shows a generally more neutral growth, with Debian still gaining H.P.D (Hits Per Day) whereas Slackware falls.

possible248′s EDIT: I knew that I was going to get in trouble for using the word “dying” in my post title. I did not mean to say that Debian was going to be wiped off the face of the Earth. What I was really trying to point out was that it was the newer ones that were being searched for, and that Ubuntu is growing at a shocking rate.

Sorry for all the distributions with positive trends that I didn’t cover. I’m also aware that Google Trends isn’t the best place to get data on this topic. My original intention was to show you some of the more interesting parts of the data from Google Trends and then leave you to your own conclusions. Clearly I did not do that properly.

I would also like to thank everybody for their input. We were seen on:

  • Digg (222 diggs, 25 comments)
  • Reddit (56 points, 63 comments)
  • Tuxmachines (529 reads)
  • Linux Today (6 talkbacks, 3478 reads)

UPDATE: The reason why there is not a scale on the Y axis is because I took these screenshots when I wasn’t logged in. Sorry for the confusion.

Posted in Linux | View Comments

On Web Services And Signing up for Accounts

June 29th, 2008 by Rishabh Mishra

These days, everybody has so many accounts at various web services. This is a known fact. Look at FriendFeed. One of it’s purposes is so people can view the online activity of their friends in one place. That means that you don’t have to go to all those separate websites to catch up on what your friends are doing.

But that’s not the only change. Before, people really liked it when all you had to do was sign up for a free account to use a service. Now, that’s not the case. Signing up for an account, keeping track of the username and password, logging in from time to time, and all that work just seems like too much when you have to do it for so many web services.

So now, there are many web services that you can use without signing in. I’ll use FriendFeed as an example here. There have been a couple blog posts that talk about how to get the most out of FriendFeed without signing up for an account.

An example is typing the below string into your URL.

http://friendfeed.com/public?service=blog

What it does is show you what all the FriendFeed users are blogging about. With URL tricks like this, you can get quite a bit of functionality without logging in.

Another example. My dad has recently discovered Digg. He doesn’t have an account, because he doesn’t need one to read interesting news. He is able to use a service without logging in.

What does this all mean? It means that new services have to come up with ways for users to try out their service without having to sign up. Of course, it’s impossible in some cases, like for webmail services (Gmail). If the ONLY way to use your service is to register an account, your service is at a disadvantage.

So, what is the latest in using services without having to sign up? Well, there is Posterous. You can start a blog without actually having to register an account. You use your email account, a service that you already signed up for, to make your first post to your blog. You are then give a reply email that asks if you want to get a password. Getting a password allows more functionality, like the ability to choose your own subdomain name, instead of having an automatically generated one.

So, what is in the future of web services and accounts? I think we will just have to wait and see.

Posted in Internet, Uncategorized | View Comments

NoiseRiver: the Friendfeed App That's Your New Bicycle.

June 28th, 2008 by Rishabh Mishra

I’m a fan of FriendFeed. FriendFeed, to me, is total awesomeness. At the time of this writing, I’ve written fifteen posts on FriendFeed (including this one). Robert Scoble loves FriendFeed too. But now, I love FriendFeed even more. Why? Because it’s possible to create truly excellent applications with the FriendFeed API.

The FriendFeed API is far from perfect, but what’s making me love it is NoiseRiver. So, who is behind this masterpiece of an API application? directeur on FriendFeed is responsible for this masterpiece of an API application.

So, what do I like about it? First off, the user interface is excellent. It takes the simplicity of FriendFeed’s user interface and entwines it with an elegance that is so hard to achieve when building a good user interface. Click on the below thumbnail to see the screenshot full-size.

Now, it does more than serve up a pretty user interface. It actually solves some of FriendFeed’s most basic problems. What does it solve?

Well, several people have talked how noisy FriendFeed users can drown out the posts of less-frequent FriendFeed users. Now, if you like the posts of the noisy and quiet FriendFeed users, you’re at a bit of a disadvantage. It’s more difficult to hear the quiet FriendFeed users, and there may be some cases when you’re more interested in what the quiet users have to say.

NoiseRiver to the rescue! It allows you to select which users you like more than others.

Okay, but the noisy FriendFeed users might also talk about topics that you aren’t interested in or don’t like at all. What do you do about that?

No problem. NoiseRiver solves this problem by allowing you to insert keywords and rate those too.

Now, I might really like NoiseRiver, but you are annoyed with something in NoiseRiver’s user interface. What do you do?

Wel, there’s the NoiseRiver FriendFeed room where you can post suggestions, and a lot of the suggestions are acted upon immediately.

In conclusion, NoiseRiver is a top-notch web application that has a great user interface and solves some of FriendFeed’s problems.

For some additional reading, you can check out Louis Gray’s coverage of NoiseRiver.

UPDATE: Apparently some people think that NoiseRiver actually has a chance of being acquired.

Posted in Apps, Internet, Uncategorized | View Comments

Beginner PHP Programmer Mistakes Part Three: Using PHP 4 (or lower)

June 28th, 2008 by Rishabh Mishra

Introduction

PHP 5 has been out for a long, long time. Yet there is a disturbing trend. I still see servers with PHP 4 installed. Why would you have PHP 4 installed? Really, keeping PHP 4 won’t help you very much in the long run. It might be more convenient as you already know that all your script work in PHP 4, but I believe that it is worth it to upgrade to PHP 5.

Get PHP 5. It’s good for you.

1) PHP 5 has features that have been in other languages for a long time.

PHP 5 introduces exceptions. As many beginner programmers use PHP, having them learn PHP 5 exceptions means that they will be familiar with the concept when they move onto other languages.

2) It allows you to use tools that only support PHP 5.

Remember that content management system that you thought would be perfect for your site? But wait! It’s for PHP 5 only. Since you’re running a PHP 4 server, you miss out.

3) Because support for PHP 4 has been dropped.

What, so you’re going to continue using something unsupported when PHP 5 is right there?

Also, if you attempt to ask a developer friend for PHP help, there is a good chance that your developer friend will tell you to upgrade, unless he or she is also running PHP 4. If your friend is running PHP 4, you should send this article to him or her. ^_^

4) You don’t annoy people that write PHP code for your server.

Let’s bring back that developer friend of yours. You have a cool idea for a PHP web application. He or she asks which version of PHP 5 you are running. You say, with an embarrassed smile, “I’m running PHP 4.4.8.”

If your developer friends are used to PHP 5, it makes it much more difficult for them to write PHP code for your sever. Friends are good, save them a headache.

Posted in PHP, Uncategorized | View Comments

General Tip: How to Ask Good Questions to Get Good Answers

June 27th, 2008 by Rishabh Mishra

Introduction

When a friends of mine ask me for help with some CSS, a regular expression, or a Python script, it can take a while for me to figure out what  the problem is. Why? Because they don’t ask questions properly. Being able to ask questions properly accomplishes two things:

  • Your question is more likely to be answered more quickly.
  • The person you’re asking gets less frustrated. A less frustrated person is also more able to answer your questions.

So, asking questions well is an important skill to learn. But how do you do it?

How to ask good questions

1) Don’t come up with your own solution, and then ask if your solution already exists.

One of my friends, new to cascading style sheets, asked me a question if a certain HTML tag existed. I didn’t actually understand why in the world he would think such a tag existed until he described to me what his problem was. I told him what his problem was and how to use CSS to fix it.

A lot of time was wasted when I was trying to decipher his original question. If that friend had not jumped to the conclusion that an HTML tag had to exist to fix the problem, we could have saved some time in finding the solution to his problem.

2) Be descriptive.

This shouldn’t even need to be on the list. It’s so obvious, yet why do so many people disobey this one?

3) Be extra careful in phrasing your question.

You should be careful when phrasing your question to avoid any misunderstandings. Use the best spelling and grammar that you are capable of, and something big to watch out for is misplaced modifiers.

Using good grammar also makes you look more professional, which is always a bonus.

4) Use a search engine.

On forums, IRC, and other places where you can ask questions, you are often told to use a search engine like Google or the forum’s search.

Now, there are some things that Google just doesn’t work well for searching. You should still try to gain some knowledge about the topic that you are asking about as that will make it easier to understand a complex answer.

5) Make sure that you understand the answer.

Remember in the first tip where I talked about my friend learning CSS? I made sure to explain the CSS that would fix his problem. Why? If I didn’t, he would come back later to ask the same question.

If your question-answerer doesn’t make sure that you understand the answer, ask for clarification.

———–

Also: 100th post! :D

Posted in Uncategorized | View Comments

Beginner PHP Programmer Mistakes Part Two: Going Nutty with Exceptions

June 27th, 2008 by Rishabh Mishra

You’re a beginner PHP programmer, and your server has just been upgraded to PHP 5. Yay! Time to rewrite that error handling code to include exceptions! One mistake that beginner PHP programmers make is that they go crazy with exceptions. They might turn the below code:

function checkUsername ($username)
{
    if (!is_string ($username))
    {
        die ('The username is invalid');
        /* Also acceptable are:
        *     trigger_error (<something>);
        *     ^-- If you the proper error handling
        *         setup for site visitors.
        *
        *     return <something>;
        *      ^-- Provided that the caller saves
        *      the return value and that the
        *      value is checked.*/
    }
    else
    {
        return true;
    }
}

oldCheckUsername ($username);

into:

class OMGYourUsernameIsNotValidException extends
Exception {}

function checkUsername ($username)
{
    if (!is_string ($username))
    {
        throw new OMGYourUsernameIsNotValidException
        ('Username = fail');
    }
    else
    {
        return true;
    }
}

try
{
    checkUsername ($username);
}
catch  (OMGYourUsernameIsNotValidException  $e)
{
    echo $e->getMessage ();
}

Exceptions are best used for things like a database connection failing. They aren’t really for simple things like form validation.

Uncaught PHP exceptions are considered E_FATAL errors, and I consider that a good measurement of whether or not you need exceptions. While you might want to terminate script execution in the case of improperly filled in forms, you wouldn’t want to use that error level for form validation.

A failed database connection seems to fit well into E_FATAL, and by that logic, it’s okay to use exceptions for it.

Disagree? Know a better way to handle errors in PHP? Tell me in the comments.

Posted in PHP, Uncategorized | View Comments

The Linux GUI Editor Showdown Part Four: Gedit

June 26th, 2008 by Rishabh Mishra

This is the fourth installment in the series that covers GUI editors in Linux. Also covered in this series are:

  • KDevelop
  • Geany
  • Mousepad
  • More to come

So, we’ve covered the rather bulky KDevelop and the featherweight Mousepad. In between is Gedit. Covered in this post is Gedit 2.22.3.

You get all sorts of neat text editor features like syntax highlighting, spellcheck, tabs, document statistics, as well as plugins. But unlike Geany and KDevelop, Gedit seems to be quite minimalist in it’s preferences.

Wait, I’ve given two screenshots so far without showing the main editor. I better show it now.

You can see that the user interface is simple, but like I mentioned earlier, Gedit packs features and plugins.

If you’re a Kate fan, Gedit can make you feel a little more at home. Below is Gedit set to imitate Kate’s syntax highlighter and has the sidebar containing open files (just like Kate has by default).

Posted in Linux | View Comments

Dr. Hany Farid And His Work to Detect Photoshopping

June 25th, 2008 by Rishabh Mishra

Just now, I finished watching an episode of Nova scienceNOW (yes, that’s how it’s capitalized). Covered in that episode is the work of Dr. Hany Farid and his work to develop software to detect photoshopped images.

One technique that he demonstrated with software is to detect parts of images that are identical. This is to detect whether the clone tool has been used on parts of the image.

Another technique demonstrated is to detect where light is coming from. If two people from two different images are cobbled together into one fake image, it is highly possible that the light sources in the original two images are in different places. This means that the two people are illuminated from different directions, and this is shown on the person. If one person is being illuminated from the left side, and another is being illuminated from the right side, you know that the image was originally two images that had different light sources.

Another way to see the light source, assuming that the image you are testing has at least two people with clearly visible eyes, is to analyze the shape and location of the light being reflected off; that is, the specular highlight. As the eye can act like a mirror, you can see a little bit about the light source, such as the shape of the light source. You can also see how the light source is hitting the person. If one person has a reflection of a square light source (like from a camera flash), and another person has a reflection of a circular light source hitting the person at a completely different angle, there is a good chance that the photo isn’t completely real.

Want to learn more about Hany Farid? You can check out (I grabbed all these links from here):

  • Hany Farid’s home page
  • Digital Forensics: An Interview with Dr. Hany Farid
  • Adobe Tackles Photo Forgeries
  • A Conversation With Hany Farid: Proving That Seeing Shouldn’t Always Be Believing
  • Digital Doctoring: How to Tell the Real From the Fake (PDF Warning)

So, what’s your prediction on the future of the Internet, photography, and digital photo manipulation?

Posted in Programming, Uncategorized | View Comments

Another Programming Language for Kids, but This One Is Impressive

June 24th, 2008 by Rishabh Mishra

I just spent today spending my time (I’m feeling redundant) with an interesting little app, Scratch. It’s a cool little application that introduces children and early teens to programming and animation.

Normally, I haven’t ever realy gotten the point of programming languages for children. I remember trying out SiMPLE to see how it compared to Python, and I wasn’t impressed. Scratch is actually pretty interesting and I would recommend it as an application to install on the computers of any young relatives you have. It’s available for Windows (appears to work on Vista), Mac, and Linux (via an unofficial installer).

Now, what are the advantages of using Scratch over some language like Python or Javascript? And is Scratch a powerful programming tool?

Well, Scratch is centered around building animations and games quickly. Plenty of children would have an easy and fun time creating games in Scratch. Doing similar things in Python or Javascript take more difficulty.

So, what does Scratch look like? A screenshot is below. Click on it to view it full screen.

Scratch has a graphical display of the code, but contains many control structures that will be familiar to programmers. Some examples are if/else, for (or rather some weaker constructs that do things that for is capable of), and exit.

Of course, many other programming languages have that and more, but the great thing about Scratch is that it has all this and is easy. Anybody can pick it up and start using it.

So, if you have access to kids, admin access to the kids’ computers, and the Internet on those computers.

Posted in Programming, Uncategorized | View Comments

User Interface Tips for Large E-Commerce Websites

June 23rd, 2008 by Rishabh Mishra

UPDATE: While it is not an e-commerce website, php.net is a great example of a website that doesn’t fall into these problems.

Introduction

Lithium ion battery technology is really cool, but lithium ion batteries don’t really last that long. So, when the lithium ion batteries in my dad’s camera die, what does he do? He is Internet-savvy long enough to know several websites where he could order a battery. He tried to get the batteries at:

  • Buy.com
  • Amazon.com
  • BatteriesPlus.com
  • BestBuy.com
  • CanonUSA.com (This is a Canon camera we’re talking about here)
  • (names of websites that I can’t remember)

So, how successful was my dad in ordering his battery? Well, he managed to get it, but how difficult was it? Problems that he encountered are listed below.

Problems in navigating large websites

1) Site search is difficult to find or doesn’t work well

On a lot of websites, when using site search, we had some problems. On a few sites (maybe on a site that I didn’t list above), the site search box itself was hard to find. This is a big problem. How is such a large site supposed to be navigable without a site search?

If the search box could be found, the results would be horrible. If you’re going to make a site search, you have to make it able to retrieve good results. If you want a good site search quickly, use a Google Custom Search Engine. Using a CSE may not be ideal, but it is the fastest way to make a site search that gives you good results.

There is also the small font problem. Is it just me, or do site search results display in really small fonts? The idea is for the user to see the results of their query without using a magnifying glass. Eveyrthing on the website, including site search results, should be in a visible font.

In one case, the site search simply failed as the links provided didn’t actually go to the product pages that the user would assume that they would go to.

2) Category listings aren’t precise enough

When site search failed my dad, he went through the category listings. You know. He went to the Camera section and then to Accessories and so forth.

Now, having just Accessories isn’t precise enough. Do you think that the user actually wants to look through all the camera accessories in order to find one battery model?

Now, the perfect solution would be search, but category listings is what you go for when search fails you. Since search seems so hard, precise category listings seems like a good thing to have.

3) The website hasn’t usually been built for all possible actions.

A lot of these websites are often very easy to navigate to achieve a certain task (buying an HDTV), but can be difficult to complete a different task (specifically looking for a certain type of battery).

A lot of the websites that my dad tried weren’t optimal for looking for batteries. Now, the web developers couldn’t possibly make a website where it was easy to achieve every possible task, but the site shouldn’t make it difficult to buy everything except what benefits the merchant the most.

So instead of only seeing if the site is usable enough to buy the latest HDTV, there should be tests to see if it’s easy to buy a very specific battery model.

Conclusion

It’s no easy task to build a large website. For those that make money off their website, website usability is essential. Maybe, in the future, it will be much easier to use these websites to buy a specific battery model.

Also, in case you were wondering (and you probably weren’t), my dad found the exact battery model produced by several different manufacturers and sold at a wide range of prices.

It will be interesting to see what changes come to these websites in the future, and I definitely know that my dad will be back on them. After all, lithium ion batteries only last a few years.

Posted in Internet, Uncategorized | View Comments

« Previous Entries

 
Wordpress Themes by and Website Templates by Blogcut Blogged Blog Directory Blog Directory - Blogged