Posted by Roger Keays, 28 December 2007, 4:16 AM A few days ago it was my friend's birthday. She is Malaysian so I sent her a message saying "Salamat Harijadi!". She replied me in the wee hours of the day this morning. (actually, more like the middle of the night really). It was quite a nice surprise though, since my late night messages usually come from a computer called gravox and say something like "HTTP service down". Anyways, so it was nice to hear from her but also fun because it made me think in Malay which I haven't done in ages and ages. It reminded me why I like Malay so much.
The more and more words I remembered, the more I realized how much I miss Malay. It made me laugh and got me excited :) Anyways, so I jotted down a few random thoughts about the things I like about Malay and why I reckon it's just the cutest language around. Here they are:
Read more...
No comments yet, be the first to comment!
| |
Posted by Roger Keays, 10 November 2007, 2:42 AM Sentences your of order word the change to tried ever have? That English to used so I'm because, first object the of think difficult it find I. Too noun the after go adjectives the, order reverse in and. Weird are conjunctions, sentence the of end go must they because (beginning of instead). Sense make that if know don't I. Introduce they clauses the between be not ever they can? This does that language any of know don't I. One this except. Shilgne it call will I. Silent 'g' a is that.
Shilgne in blog whole a write you could? Blog to incentive need I sometimes, fun is this and, try will i so. Words little out left I noticed I already. c:set with mistake common about is blog this.
Read more...
3 comments, post a comment!
| |
Posted by Roger Keays, 2 November 2007, 2:00 PM I think a lot on issues of psychology, politics and ethics, but generally refrain from spamming my Java blog with these ideas. However, recently I had an experience that Java people might be interested in and it's been a while since I blogged, so I'm going to share it here.
A recruiter from Google's Site Reliability Engineering (SRE) team contacted me asking if I was interested in employment opportunities. I'm doing pretty well for myself which I explained, but opportunity is opportunity so I went along with it and was given on short pop quiz over the phone. Naturally, I got the easiest question wrong and was subsequently told that I'd failed the pre-selection process!
Read more...
No comments yet, be the first to comment!
| |
Posted by Roger Keays, 18 October 2007, 10:28 AM Just yesterday I had a request from a customer to build a vertical menu down the side of the page in their design. I've always had a strong preference for horizontal menus, but have never really known exactly why. When trying to disuade my customer she naturally asked me this question: why?
Well, now I've thought about it I've come to the conclusion that there are some good reasons to go horizontal instead of vertical. Here are mine:
- Being evenly distributed across the page, they create balance which makes you feel good
.
- They make better use of space as there is no vacuum below the menu which is common with vertical menus.
- It's easier to read horizontally than vertically.
- It's easier to move mouse side to side than vertically.
- Submenus are easier to access as they have a larger area for the mouse to enter.
- As people are generally lazy, the shorter menu items more common in horizontal menus are easier to read.
What do you think?
6 comments, post a comment!
| |
Posted by Roger Keays, 6 October 2007, 11:50 AM At last... an opportunity to spend some quality time blogging :) . I've had some very positive feedback from my previous blogs which is always nice and motivates you to write more. Well, today I wanted to nail a long standing issue with positioning blocks of text in the center of containing elements.
It all started when a customer rang me and said they wanted the text in their menu items wrapped. They were already centered using #menu { line-height: 70px; text-align: center; }, but this method breaks if you need to wrap lines, because both lines become 70px high. So... what should I do? Tell the customer that wrapping text is just too hard?!
Read more...
2 comments, post a comment!
| |
Posted by Roger Keays, 28 August 2007, 4:09 PM It appears that everybody has come up with their own way to implement page actions in JSF. i.e. execute some code before a page is processed/rendered, like you did in Struts. Well, it turns out that I occasionally need this too (surprisingly infrequently though), so I had a look at how Shale and Seam solve the problem.
Shale uses faces-config.xml to map view ids to managed beans which implement a ViewController interface [1]. Okay, that seems alright, but it means more xml and more classes. Often I just need to put a request-scope attribute in place, so this feels like too much work to me. Seam allows you to map view ids to method expressions via a pages.xml configuration file [2]. This means no extra beans, but does mean more configuration. Can it be done with no xml and no new beans?
Yes! And the tool for the job has probably been in your toolkit all along - Facelets TagHandlers.
Read more...
4 comments, post a comment!
| |
Posted by Roger Keays, 28 August 2007, 3:29 PM I always get a surprise when I try to visit a well known company's website (e.g http://harveynorman.com.au) and get a 404 error. The problem here is that I get lazy and often don't bother putting in the www part of the hostname. I guess the sysadmins must be even lazier than me, because adding a mod_rewrite rule to allow this shortcut is very easy. Here's what it looks like:
RewriteEngine On RewriteCond %{HTTP_HOST} ^domain1\.com\.au$ [OR] RewriteCond %{HTTP_HOST} ^domain2\.net$ [OR] RewriteCond %{HTTP_HOST} ^domain3\.com$ RewriteRule ^(.*) http://www.%{HTTP_HOST}$1 [R=permanent]
No comments yet, be the first to comment!
| |
Posted by Roger Keays, 28 August 2007, 2:05 PM Recently, I was asked to build a rotating testimonials block in the sidebar of a site. The block would display each testimonial for 5 - 10 seconds before it changed. Loud and rapid changing elements on a website make me cringe. It's like listening to somebody scape their fingernails on the blackboard. Conversely, soft or slowly changing elements make me feel great! No, really, they do - especially fade effects. I can watch them over and over fading in and out... it feels so good.
I'd seen some people put non-flash fade effects to good use on a few sites so I thought I'd try to give it a go myself. Nobody wants reams and reams of code for some simple effects like this though, so I implemented a few simple javascript functions to do the job for me. Here's how it works.
The fade effect is implemented by modifying the opacity of the element. Recent versions of Firefox, Safari and Opera implement the CSS3 opacity style which can be used as you might expect. Older versions of the browsers, and Microsoft Internet Explorer have the own proprietary methods to set the opacity. If you wanted to give an element fixed opacity you could use the following CSS declarations:
Read more...
12 comments, post a comment!
| |
| |
| |