How Twitter Guys Do Things Smart

9 09 2009

There are a lot of thins you don’t notice or analyze deeply enough until they cross into your area.

I am using Twitter few months already and I never though of why they don’t show the exact time of the tweet but instead shows something like “Posted XX minutes ago…”. Undoubtely this is good way of expressing what the end users need, since I don’t need to know exactly when my friend posted a tweet.

But after I’ve played a bit with times, time zones and date formatters in Java I found out that there is no nice way of determination the client time zone on the server. HTTP request for some unknown reason does not provide any headers for this purpose and that is why a lot of web-apps prompts you to enter your time zone when you first log in.

The only way to do the thing is to use Java Script on the client to determine the time zone and pass this info in the request. But even then you have a lot of shit with DST and other stuff.

Someone in the Twiiter team perfectly resolved the problem by suggesting that users will be happy with knowing how many minutes ago the post was written. That is much more easier to implement. Wonderful :)





Java Time

4 09 2009

LOL:

Please note that the all the deprecated methods and constructors of the Date class should never be used. They are from a time when the Sun people were confused about time themselves.

Source: http://www.odi.ch/prog/design/datetime.php





Java Data Objects and Russian Folklore

21 07 2009

In this post I’ll try to explain in English few concepts that came from some Russian fairytales.

I just was sitting in the office and reading a book on JDO while somewhere in my head a thought bubbled that it would be great to have 4 things to have no problems:

  • скатерть самобранка
  • ковер самолет
  • сапоги скороходы
  • шапка невидимка

To start with all these 4 things are a bit magic, they possess certain supernatural qualities.

Скатерть самобранка can be translated like a magic tablecloth. It serves you a food whenever you tell it so.

Ковер самолет is a magic carpet that can fly. Just a transportation vehicle ))

Сапоги скороходы this is what is called seven-league boots. Just one more transportation mean.

Шапка невидимка is a magic hat. When it’s on your head you are invisible.

It is interesting to me which of these things have some analogues in the western fairytales. In slavic folklore there are much much more magic, seems like people always liked to dream about getting things without labor just by magic :)

Now you may wonder why I titled this post “Java Data Objects and Russian Folklore”… In the JDO book there is a section called “Transparency”. I think that is why my brain decided to rest a bit and went to some “шапка невидимка” things. Sometimes seemingly unrelated things can be related. Learn from it ))





MSDN vs. Adobe Help

25 06 2009

I should admit that MSDN C#/Silverlight articles quality is better comparing to the help system of Adobe for ActionScript/Flex.

It’s hard to explain but the feeling is like they are written more professionaly and with keeping a large picture in mind.

MSDN site itself is quite ugly in design but that is minor thing as long as it gives me a good content :)





Operators overloading in C#: good and bad examples

23 06 2009

While reading “CLR via C#” of Jeffrey Richter, which I must say is a great book,  I’ve come up to the section dedicated to operators overloading. I think this is quite interesting feature of the language and it can be very practical. Mr. Jeffrey has delved into very specific details of how Microsoft recommends to design operators overloading and what is his personal opinion but somehow I was not able to get the clear view on the topic. Instead I found a very short and practical article here: http://www.csharphelp.com/archives/archive135.html

I think all authors should focus first on the topic itself and only then on their critics about how Microsoft or other compilers/languages producers do their job.





Viral Marketing

17 06 2009

Some time ago I have first heard about viral marketing in relation to social networks. It sounded interestingly to me since my interest in immunology. The word “viral” attracted my attention and I put it on a shelf for closer investigation a bit later when I have some spare time.

Today I’ve found that spare time and let’s see what wikipedia tells me on the thing: … marketing techniques that use … social networks to produce increases in brand awareness … through self-replicating viral processes…

After closer look I see that this is just a buzzword. I must say I don’t like buzzwords and moreover I don’t like people who operate with buzzwords. Such people immediately shows me their lack of fundamental knowledge of things which they try to substitute by words.

It may sound too aggressive but this is how I see it. Fundamental progress in any science and technology is not going through the ways of buzzwords. It goes through people who see a problem, analyze it and then creating a solution. In general this is called SYNTHESIS.
In case of buzzwords the process is reverse: people take already established things and processes to which they are not related at all, they call it with a nice word and try to bring it forward as something new and something their.

Advertising has been there long ago. Advertising in net has been there long ago. There is nothing self-replicating when comparing spread of information about printed advertisement and about advertisement in a social network. Just a scalability and speed is a bit different. There is too much ANALYSIS and too little SYNTHESIS. I think this is what all marketing and marketers are all about.

Watch more ads, take more bullshit ppl :)





Be Careful with Renderers

17 06 2009

After we added one fancy renderer to ADG to highlight our search results in case user performed a search I noticed that vertical scrolling slowed down way too much.

After some investigation we found the culprit: in case when no search was performed the renderer filled the cells with white solid fill using beginFill() and endFill(). We substituted this to just graphics.clear() and everything was fixed. So it appears that beginFill() – endFill() is quite expensive though primitive operation. Not funny :)





My environment

10 06 2009

I’m growing and I need to move.

After recent talks about life with two my friends, one living now in China and one living in South Africa I thought for the first time that my life style should be constant moving. I would like to live one year at one place, the next in other and so on.

Also I clearly see I’m growing professionally. My understanding of what the software engineering is is broader than I can see in a lot of my colleagues. I need better environment and will start searching for it.





State Transition Diagrams with UI Mockups

3 06 2009

Bill Buxton from Microsoft Research in his keynotes talk on the MIX09 shown a very good idea I was not thinking about before: for each UI mockup you nead to have on the same piece of paper a small state transition/sitemap diagram that shows where exactly the screen represented by that mockup resides in the interaction flow. This is small but very important practice I think.

Watch the talk here.





The First Law of Software Development

3 06 2009

Today I have produced the first funny law of software development: if you’ve got to deal with a hairy DB then no matter of your effort you’d get a hairy application :)