In Javascript/jQuery, Qucik Tips on
3 July 2011 with no comments
This is something I’ve learned recently. Code like the following can be troublesome. Elements may be jumping around a bit depending on your HTML/CSS.
$(document).ready(function() {
$("#some_element").fadeOut('slow');
$("another_element").fadeIn('slow');
});
Instead try using callbacks. A callback is a function that is called after the current function has finished. In the previous example an empty callback (does nothing) is called once the first element is faded out and again a different empty callback for when the second element is faded in.
We can write the previous rules like so:
$(document).ready(function() {
$("some_element").fadeOut('slow', function() {
$("another_element").fadeIn('slow');
});
});
In General on
21 January 2011 with no comments
It’s not something most people would notice, but I’ve stopped using google analytics (or any analytics service at all) on my site. It feels like analytics on something like a personal site is a burden. It doesn’t help me build more, it doesn’t make my work more interesting, I don’t tailor myself for my visitors. My person site is there as an online presence for me.
I’m not saying analytics is a waste of time
If I had a Saas site or something similar I definitely would use some kind of analytics program. I’d like to know where my users are coming from, the hardware/software they’re using and any other information I can get that would help be build a better product for them.
We aren’t products
We’re people and as far as I’m concerned our personalities and quirks shouldn’t be subject to change based on the “market”. We are who we are. So I’m just going to be myself and give people a break (if only on one small site) from the prying eyes of the internet.
In General on
19 January 2011 with no comments
I’m sure we’re all guilty of it, I certainly am. That doesn’t change anything though. Copy and pasting code is bad. Why? You don’t learn anything copy and pasting. Just like our muscles have memory so does our mind (shocking!) and hitting cmd-c then cmd-v doesn’t provide it with any useful information.
Take my work with wordpress as an anecdotal example. I (almost) never copy and paste code that goes in the loop. However for creating widgetized areas I copy and paste, then edit the options to suit my needs.
The problem of efficiency in coding
I never remember the syntax for creating widgetized areas. I know it more or less. But to get it working I have to look it up. What a waste of time.
Compare that to the loop
I just jump in and code what I need. No wasted time, no fuss, no stress from not being able to quickly find what I need. Not to mention the benefit of having a clearer understanding of the code.
In General on
13 January 2011 with no comments
It’s so frustrating. You click on a link for an event you’re interested in and find out it’s already passed. That’s ok, you think, they must have other events soon that I can check out. So what do you do? First you probably scan the site looking for a link or hint for other events.
Unfortunately there’s nothing to be found. If you’re a savvy web user you might realize that the URL of the site is structured like so: http://www.somesite.com/events/old-event
Great!
That means I can just delete ‘/old-event’ and I should be sent to a page with some kind of information about the events, right?
Wrong.
All too often I get a 404 page not found error. This seems like a missed opportunity for great user experience. Beginner users won’t know/think that they could do something like that but us savvy users do. I know there are a lot of sites where this would work but if you’re developing your site please keep this in mind and don’t miss out on a great (and simple) user experience benefit.
Edit (Dec – 2011): One idea I had is that many 404 pages give the user a search box or try to link them to some “general useful pages” like home or the blog page. Why not pull the path the user tried to enter and prepopulate (or even just execute) a search with that information. Much more useful in my opinion.
In General on
12 January 2011 with no comments
A few weeks ago I decided to create a blogging engine to serve as a “lightsaber” for developers. Just recently after having started the project I realize how difficult it really is. Generally I’m a front-end developer. That means a lot of HTML, CSS and Javascript with some PHP thrown in here or there. Never have I had to code the parts of a site that I’m working on now. Thankfully I’m working with a friend who has considerable coding chops on the project.
The difficulty isn’t swaying me, but I want to be aware of the challenge. And like JFK said we do these things “not because they are easy, but because they are hard”.
In General on
24 December 2010 with no comments
It seems like many people think once a programmer has passed an arbitrary age (lets say 35) they should move on to “better” things. Things like management, consulting or running your own business. I don’t necessarily think any of these paths are poor career choices. Yet many think that if a developer doesn’t move into a non-programming role they have failed to make the next “correct” step in their path.
Successful people shouldn’t be coding. They should be attending meetings, sending emails and making phone calls. Who wants to do any of that stuff? If you like to code, build, hack, design, create, whatever, I think you should do it no matter how old you are.
In General on
6 December 2010 with no comments
I read a post a few days ago that said every developer should build a blog. Unfortunately I can’t seem to find it again, if anyone knows what it is I’d love to link to it.
Anyway, the idea was that every developer should build their own blog engine. I loved the analogy that Luke Skywalker built his own lightsaber and we should do something similar.
There are many reasons to do this: helps you learn a language, it’s a project to show to potential employers/clients, it’s fun. I started writing a PHP powered blog a few years ago but got bored quickly, I think it’s time to give it another go.
Maybe in Javascript this time… that would be interesting.
In General on
24 November 2010 with no comments
I’ve always felt that the web is an under-appreciated medium. Ask most web developers and designers and you will be sick of the complaining in five minutes.
I’m not going to complain. I want to make it better.
The internet reminds me a lot of the printing press. It didn’t make Gutenberg rich but it changed the world. It gave authors a louder voice and a bigger audience. The internet is doing much the same. We should look to the great authors of the past to learn how to push ourselves and create good work.
Who better to start with than Hemingway?
In General on
17 November 2010 with no comments
Ask any web developer what they hate about front-end development and you’ll likely get a common reoccurring answer: cross browser support.
It’s not just Internet Explorer 6. There are significant differences between IE7 and 8 with version 9 soon to come. Firefox acts slightly differently than webkit and html5/css3 is not widely supported. So what’s the answer to these issues? I think it’s the mobile market.
New smart phones are released all the time. People who normally would be using legacy software have no choice but to use newer technologies. Think about all the iPhone users browsing with Safari on their mobile. They might otherwise be using IE6 for all we know.
There’s already talk of mobile internet overtaking traditional computer based browsing. If that’s the case then I can’t wait until I can start using all the cool html5/css3 tools without the underlining feeling that I’m wasting my time on something a lot of people won’t even see.
In General on
18 June 2010 with no comments
I was at the North by Northeast Interactive conference this week (June 14th to 16th). It was a huge success. Great people, great venue and awesome ideas. Rather than write a full write-up of the event I decided to look through my notes and use it to explore a few ideas.
I’ll be posting articles based on my notes from the event in the next few weeks. Keep an eye out for them.