Facebook is now Twitter.
March 19, 2009 on 12:44 am | In General | No CommentsFirst off, sorry for the rather business-ish article, as I normally tend to write technical articles here. Second off, I’d also like to apologize for the lack of articles lately — I have a lot of topics in mind, but never had the time to write them in details.
With that intro out of the way, I’d like to say, Facebook has just recently headed for a completely wrong direction.
Let me start by saying this — I’m normally a fan of change. I love changes, as opposed to most people who like constants. When Facebook first switched to the new layout from the old boxy layout, I was thrilled, unlike what appeared to be millions of people opposing to it. It was a change for good. Same for the initial introduction of newsfeeds — as soon electro-absorption as it came out, my first reaction was “This is good stuff. I no longer have to waste time going through friends’ profiles. It’s all information that I already have, just aggregated nicely.”
That said, the latest change of the homepage newsfeed to make it basically become Twitter, is trash, to say the least.
Please refrain from using the term “Sign in”.
October 14, 2008 on 4:41 pm | In General | No CommentsI know I haven’t written any articles in 5 months; that is largely due to my new job which has kept me super busy. And this isn’t any long-winded article, it’s sort of semi-rant and semi-advice.
If you are in charge of any web application sites at all, and it involves signing up for an account and logging in; please do NOT use the term “Sign in”. What’s wrong with “Login”?
Humans tend to read words, terms, or labels as a whole; not word-by-word or letter-by-letter. For users who are comfortable with web technologies, very often they just skim the page for what they need and click on things. When you have labels called “Sign In” and “Sign Up”, especially side-by-side, one would very often click the wrong one just because they are so similar. For a perfect example, please look at Zecco.com and коли под наемAliveNotDead.com.
Please. Use “Login” rather than “Sign In”.
CSS tips: Widths calculations, and links with icons
May 9, 2008 on 1:20 pm | In General | 4 CommentsI haven’t posted in a while, so let’s see if I can make up for that by posting two different CSS tips today.
These are more on the intermediate level side. If you’re an advanced CSS developer you may already know about these. Today I bring you:
- Elements’ widths calculations in CSS under different browsers (most importantly, the difference between IE and Firefox).
- компютриBest method to implement links with icons next to them.
JavaScript: Using Event Listeners, attaching handlers on page load, and DOMContentLoaded
March 21, 2008 on 9:03 pm | In AJAX, JavaScript | No CommentsFor anybody who has ever coded any JavaScript at all, they are no doubt familiar with events such as “onclick”, “onmouseover”, “onmousemove”, and more. In old HTML web pages, it was very common to add these attributes to <a> tags to achieve some special effects.
Later on, browsers begin to support these attributes even in other tags like <div>, and pretty much anything else.
However, as web standards develop over the years and people’s coding practices for the web begin to standardize, it is generally considered bad practice to use them. There are many reasons for this, among others:
- You cannot attach more than 1 action this way. If you want to do a lot of things in one event, you will need to put a lot of code either in this attribute, or in the function being called from this attribute; and these may very well be unrelated actions. This makes your code less organized and harder to develop.
- No good separation of presentation (HTML) from functionality (JavaScript). Everything is mixed together. This makes collaboration development efforts difficult; and makes the code hard for you to manage even if you were the sole developer.
Fortunately, we have an alternative solution. They are Event Listeners.
Internet Explorer issue - maximum of 32 CSS @import
March 11, 2008 on 7:11 pm | In General | 6 CommentsTo be honest, I just ran into an issue that I thought was fairly ridiculous.
Internet Explorer restricts you to a maximum of 32 @import statements in your CSS file.
For the less advanced developers, you can import another CSS file from within one of your CSS files. Consider it like a #include in C programming, or an include statement in PHP. The syntax would look like this:
@import url("mystyle.css");
When you are developing a complex web application, you are likely to have many CSS files. Admittedly, we haven’t cleaned up the CSS structure and removed any outdated CSS stylings for a while, in our project. We shouldn’t have imported so many. But it struck me as ridiculous for Internet Explorer having such limits. (Needless to say, Firefox has no such ridiculous limits.) To me, it just seems like a programming flaw (using a 5-bit number as indexing for imported files?).
Reference: http://www.juniper.net/security/auto/vulnerabilities/vuln3394.html (the topic discussed in this link is not related, but pay attention to the end of the second paragraph: “Internet Explorer imposes a maximum limit of 32 imports that an individual styleSheet object can hold, and a depth limit of three on the number of style sheets that may be included within the style sheet chain.”)
Update (3/27/08): Apparently, IE doesn’t only impose a number of files limit — but even a file size limit for each CSS file. The IE CSS file size limit seems to be ~288kb. Again, Firefox doesn’t seem to have such limits. Way to go IE, for continuing screwing web developers up.
CSS: z-index - so what appears on top?
March 5, 2008 on 12:26 am | In CSS | 1 CommentCSS provides an interesting property called z-index, that determines what element appears “on top”, on a page. You can tell that this was put in the CSS standards because of absolute positioning. Imagine the 2D page having X and Y coordinates, and the Z-axis points out of the screen at you, as well as inside to the page.
Interestingly, when these CSS standards were first developed, no one imagined they could become so useful — it’s an important part of what makes web 2.0 applications like meebo possible. (chat windows overlapping others to simulate a desktop application design)
So, when developing web applications nowadays, you could very well have needs to utilize this property. Unfortunately, support for z-index is flaky in browsers. Not every browser interprets code the same way. Unfortunately for developers, Firefox and Internet Explorer, again, have different opinions on z-index.
In this article, I will discuss some potential discrepancies with z-index, and how you can get around them.
JavaScript: jslint, data types, “null” and “undefined”
February 27, 2008 on 1:52 pm | In JavaScript | No CommentsStraight to the point: If you want to get one thing out of this article, get this:
In JavaScript, “null” is not the same as “undefined”.
This was what costed me some debug time recently when working with JavaScript at my job. I will talk about how I came across this issue, because there are various valuable aspects of this story that could be worth reading for those of you frontend developers.
Actually, scratch that, if you don’t know about jslint, do read the following section too. It is useful, and you won’t regret it.
Continue reading JavaScript: jslint, data types, “null” and “undefined”…
Special announcement: Badware is gone
February 13, 2008 on 2:53 am | In General | No CommentsSo, I was checking my blog’s statistics and found it weird how it suddenly had so much fewer visitors and no traffic referral from Google for a couple of days.
Then I was reminded that my Wordpress hasn’t been updated in a while. So I ran a check in the source code of my blog for some common hacks (usually an <iframe> code inserted somewhere), and guess what, I found some.
This lead to Google then listing my site as “harmful”. This is a special announcement entry to tell you all (however few regular readers I have) that the badware is removed, and Wordpress is updated to the latest and greatest.
This is also a post to tell you that, if you own a Wordpress blog running a version older than 2.3.2, you should update. More info could be found on this Wordpress support thread. I hope Google didn’t scare anyone off (especially potential new visitors of my blog) by saying it’s a harmful site. And I hope they do the review as soon as possible, as I submitted it for review arleady.
CSS: Absolute position in a relative block; and IE’s hasLayout property
January 17, 2008 on 2:19 pm | In CSS | 2 CommentsWhat a long title for a post! And it sums up what I’m writing about this time. I’m going to talk about a semi-commonly known CSS trick, as well as a potential problem with Internet Explorer 6 with it and the fix for that. Most advanced CSS coders/web designers will be familiar with this trick, but the beginner to intermediate readers will certainly benefit from this.
CSS Positioning
If you’re reading this, you probably know what CSS positioning is.
When you define the CSS of a div block with position: relative, any top, left, bottom, right attributes you give it will move the block accordingly, from its original position (where it would be if you didn’t move it). Giving it top: 20px will move it 20px below where it would be.
On the other hand, if you define a div block with position: absolute, you are essentially telling it exactly where it should appear on the screen. Giving it top: 0px and left: 0px will put the block at the very top left corner of the page. It also effectively “floats” the element and put it on top of any page element that are in the way, but don’t confuse this with the float attribute in CSS. Also, you can control which element appears on top with z-index, if you have more than one.
That said, let’s get into what I’m really talking about this time…
Continue reading CSS: Absolute position in a relative block; and IE’s hasLayout property…
PHP Web Applications Development — A Starter Tutorial
December 18, 2007 on 2:16 am | In General | No CommentsThis is a beginner’s guide to setting up an environment to start doing web applications development in PHP. If you are anything past the beginner level, this article may not be any beneficial to you at all; so you may stop reading here.
A friend of mine has recently requested me to write a starter tutorial for someone (presumably, who already has some programming experience and web site development experience, as he does) to start doing web applications development, particularly in PHP. I thought, hey, maybe I should just write it up here, since I haven’t written anything here for a while.
In this tutorial, I will cover some simple steps on how to setup a web server (Apache), PHP, and a database (MySQL) on your machine. In particular, I will assume the use of the Windows machine. Why? Honestly — if you’re operating Linux already, shouldn’t you know enough to be able to setup all that on your own?
I will also be writing some of my preferred methods of managing the server.
Continue reading PHP Web Applications Development — A Starter Tutorial…
Powered by WordPress with Pool theme design by Borja Fernandez.
Entries and comments feeds.
Valid XHTML and CSS. ^Top^
Save in del.icio.us
StumbleUpon this