• Home

CodingExperiments.com

CodingExperiments.com is a site where I can (obviously) experiment with various demonstrations of code.

Search

Category:

  • AJAX
  • Announcement
  • Apple-related
  • Best Practices
  • Blogger
  • Blogging
  • BurstCMS
  • Content Management System
  • Debugging
  • Experiments
  • FriendFeed
  • Gaming
  • General Code
  • Internet
  • Javascript
  • Linux
  • Microsoft
  • Microsoft Windows
  • Networks
  • Open Source
  • PHP
  • Programming Tips
  • Rant
  • Security
  • Storage
  • Twitter
  • Ubuntu
  • Uncategorized
  • Web Development
  • Windows Vista
  • WordPress

Archives:

  • 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
    • 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

Blogging Is Difficult. Here Are Seven Tips to Help

April 29th, 2008 by possible248

This post has been updated several times.

In today’s times, blogging is getting increasingly popular. Besides individuals blogging (or tweeting) about what they had for breakfast, corporate blogging is increasing in popularity. To be a successful blogger, there are many things that you need to do correctly.

1) Use Visual Aid Whenever Possible

While search engines won’t care about your images, if everybody wrote websites for search engines and search engines only, nobody would use CSS. Images are a very good way to attract the attention of a person. If writing about hardware, include a picture of the component. If writing about software, include a screenshot. Writing about something else, there are plenty of sources of stock images to use.

2) Don’t Overflow the Reader with Useless Or Boring Posts

Plenty of sources will tell you to blog frequently, but you shouldn’t be filling your blog with content that your readers are not interested in. The ultimate goal is to provide good content on a regular basis. If, at first, you can’t achieve that, go for good content on an irregular basis.

UPDATE: To read some more blogging guidelines that go more into how to create good content, you can check out this Google Blogoscoped post talking about good blog writing style.

UPDATE 5: I found a humorous SlideShare presentation titled “10 Ways to a Killer Blog”. Interestingly enough, there are 15 funny tips.

3) Allow Users to Comment

People love to share their opinions. The internet makes that so much easier. While it will require some additional work for you as you will have to moderate comments, set up anti-spam, etc., your readers will appreciate the ability to add their own tidbits of information and you’ll enjoy getting feedback from your readers.

4) Don’t Slap Ads on There at First

If your blog isn’t really popular yet, don’t put ads on there. Advertising is already annoying, and projects like AdBlock are reducing the advantage of putting ads on your website or blog.

Once you start getting visitors, and the cost of bandwidth is increasing, you could add some non-obtrusive ads to help lower costs.

UPDATE 2: You can check out an Alertbox written by Jakob Nielsen covering the most hated web ad techniques.

5) Don’t Hate the Adblock Users

Plenty of website have started blocking the Firefox user agent, or putting in flashing messages if Adblock is detected. This is bad behavior that will turn away your visitors. You shouldn’t put anything more than a gentle reminder that hosting isn’t free.

6) Link Properly

UPDATE 3: I’m going to link to more of Jakob Nielsen’s work. This time, you might like to read an Alertbox about how to style links properly.

6.1) Don’t Link like This

The method of linking demonstrated above is annoying, as the visitor doesn’t know what they will click on. You are also giving them a barrage of pages to look at, as they might think that they won’t understand your post if they don’t read those pages.

6.2) Don’t Mess with the Status Bar

Don’t use TinyURL to obscure what the link points to or use Javascript to put some unrelated message in the status bar. Give users confidence that they know what they are clicking on. If you make a link that hides what it points to, a user might think it’s a prank with Javascript alerts or a rickroll (Don’t worry. That’s a link to the Wikipedia article).

6.3) Cite Your Sources

Show that you get your information from a credible source. Cite your sources. This will enable your readers to learn more about the topic that you are blogging about as well as prove that you care about accuracy.

7) Pick a Good Design

Content is king, but bad display can weaken the effect of your good content. If you have a hideous color scheme, have way too many files (images, stylesheets, or external Javascript files) slowing down your page’s loading times, or some other thing wrong with your design, your readers are not going to appreciate it.

UPDATE 4: If you are interested in reading a book on good design, you might want to check out The Principles of Beautiful Web Design by Jason Beaird

Posted in Best Practices, Blogging, Internet | Comments

Interactive 3D Viewer Written in Javascript

April 17th, 2008 by possible248

Just going to point you to a quick link that shows a nifty little Javascript viewer that displays 3D models by rendering them into static images. You can see a demonstration of it with a fighter jet here.

Javascript isn’t exactly what you would prefer to write a 3D viewer in, but this is another demonstration of the power of Javascript, as it makes its way into new places like Greasemonkey and Adobe AIR.

Posted in Javascript, Uncategorized, Web Development | Comments

Why I Dislike C++

April 13th, 2008 by i80and

I’ve always been a big advocate of C. The simplicity of the language is elegant and beautiful. It’s clean, fast, and it’s everyplace. But “recently”, I’ve heard disturbing rumors of an upstart language attempting to capture C’s market share: C++. Having a reasonable amount of experience with C, and having taken a class on C++ at the University of Minnesota, I feel at least partially qualified to explain–in my usual cynical and aggressive way–why C++ is not conductive to streamlined program development. To open, I wish to quote Linus Torvalds, benevolent dictator and bigwig of Linux:

C++ is in that inconvenient spot where it doesn’t help make things simple enough to be truly usable for prototyping or simple GUI programming, and yet isn’t the lean system programming language that C is that actively encourages you to use simple and direct constructs.

C++ is a horrible language. It’s made more horrible by the fact that a lot of substandard programmers use it, to the point where it’s much much easier to generate total and utter crap with it.

Also I wish to quote Eric S. Raymond’s excellent The Art of Unix Programming:

…the language’s principal designer has conceded that he doesn’t expect any one programmer to grasp it all. Unix hackers do not react well to this; one anonymous but famous characterization is “C++: an octopus made by nailing extra legs onto a dog.”

  1. Performance - There’s persistent rumors that C++ programs are slower then C programs. This seems logical, seeing as how type polymorphism and other object oriented techniques are much harder–and in some places impossible–to optimize than simple procedural programs. This on its own is insufficient, however, as choosing a language purely based on performance is in many cases premature optimization. Therefore, I proceed.
  2. Beauty - C++ is, quite simply, ugly in my opinion. While the syntax of C can be learned in a few hours, the syntax of C++ can take days to fully understand. It’s filled with absurd and petty little rules, specifically in operator overloading, type polymorphism, inheritance, namespaces… in fact, let’s just say everything. This I imagine is debatable. However, as a student of the language who was already familiar with comparable languages such as C and Python, I found it to be a mess. Especially since many features of C++ are quite brittle and break if you don’t use OOP and only OOP. Try uses an enum with templates, and watch as your compiler starts yelling at you.
  3. Why? - This is a biggie. Quite simply, C++ fixes nothing. The big problem with C was memory management. Sure, you can boast about how automatic garbage collection is for wimps and whatnot (as I have), but pointers are one of the biggest sources of bugs in C. C++ did absolutely nothing to fix this. It’s like Subversion versus CVS (Watch Linus Torvald’s talk about git here); they missed the point.
  4. Debugging - I can easily imagine C++ programmers regularly having nightmares featuring compilation errors, and for good reason. While most languages like C and Python give fairly clear errors, a simple syntax blip in C++ can–and will–turn into a page of bizarre and non-readable errors that have absolutely nothing to do with the actual problem. To quote one of my TAs to the best of my ability (I took the class a while ago),

    That’s why some people hate C++ with a passion.

  5. OOP - Firstly, let me point out that I do, in fact, like OOP. I use and love it in Python. But I don’t lay awake at nights thinking “Gee, I wish C had classes!”. Rather, I lay awake at night thinking “Gee, I wish C didn’t make me manage my memory manually!”. This is much like point three; the designers of C++ missed the point. But that’s not what this point is about. I wish to quote again Eric S. Raymond in The Art of Unix Programming:

    They encourage architectures with thick glue and elaborate layers. This can be good when the problem domain is truly complex and demands a lot of abstraction, but it can backfire badly if coders end up doing simple things in complex ways just because they can. All OO languages show some tendency to suck programmers into the trap of excessive layering. Object frameworks and object browsers are not a substitute for good design or documentation, but they often get treated as one. Too many layers destroy transparency. It becomes too difficult to see down through them and mentally model what the code is actually doing. The Rules of Simplicity, Clarity, and Transparency gets violated wholesale, and the result is code full of obscure bugs and continuing maintenance problems.

    This isn’t a problem necessarily with OOP per se, but it does make it easy to shoot yourself in your own foot, which C/C++ already make quite easy via memory management. This topic is very complex and obviously full of political landmines (since, unfortunately, in non-Unix environments, C++ has been offered as The Solution). I highly suggest reading The Art of Unix Programming if you have the time.

I wish to emphasize that C++ has its place. It’s not uniformly bad, and in some situations such as games and GUI development, it will probably make the developer’s life much easier. But the point of this article is to suggest that in many cases, it’s better to steer clear of it.

EDIT:
I should clarify a little bit. C++ was not hard for me to learn (though truth be told my class didn’t get too deep into templates and didn’t cover namespaces.) I just don’t think that the extra complexity inherent in the language is worth the gain.

Posted in Rant | Comments

« Previous Entries

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