In many cases your application must keep track of an entity creation or update time. Do you know, that this can be done automatically?
Yes, I know, there is such feature out of the box in many frameworks (for example, Symfony). Naming convention guaranties that database table’s column named ‘stamp_created‘ will be set by entity creation date, and ’stamp_updated” – by time when any column of the entity has been changed. This done by application server side code (e.g. PHP).
The same can be done by good database table defenition (in MySQL).
Create a TIMESTAMP column with CURRENT_TIMESTAMP as default – and that’d be an auto-initializing ‘stamp_created field.
Create a TIMESTAMP column with ON UPDATE CURRENT_TIMESTAMP directive – and that’d be an autoupdating ‘stamp_updated’ field.
Now, my reader, I need your feedback: do you think it’s a good idea to create a handwriting generation service?
The idea is you come to a site, type some text in a form and as result download a PDF file which being printed looks exactly as if you wrote by a black gel ink pen.
I’m sure I can do this since I was working on such stand-alone tool several years ago. It would be fun for me to reimplement it for on-line use, but is there any point in such service?
What do you think?
P.S. It’s not a font looking like a hand-writing. You won’t recognize that it was generated+printed if an ink printer is used. As example:
I created Rival Alert Pal - it’s a FireFox addon that helps to add data to my new data scraper project Rival Alert.
With its help you can just select a number on a web page which you want to track, right-click on it and select “Add to Rival Alert” menu item – after that this number will be added to the Rival Alert, and its updates will be tracked every day, so that you would be able to keep an eye on the value’s changes:
The same can be done for FeedBurner counter images – just right-click on it and ”Add to Rival Alert” menu item.
I’m happy to announce that my project Rival Alert is ready for alpha testing!
Rival Alert is a data scraper that keeps track of statistics located on public web sites: forum registrations count, page visits, stock price or number of search results — any kind of numeric data.
Bloggers! There is a cool feature for you — Rival Alert can parse FeedBurner counter images so that you could know how popular other bloggers are.
Another my class has become a winner of PHP Classes Innovation Award – it’s the implementation of Binary Search algorithm. Yes, it’s the algorithm we all know from university – it’s strange for me, that it was considered as innovative.
I wrote this class as a test task while an interview for a new job. Results were so impressive for me, that I decided to share this piece of code: it finds result in 10Gb file for less than 5 seconds! File must contain key/value pairs (separator can be defined, by default it’s equal sign), and these pairs are sorted by keys. You define what key to search and get correspondent value very quickly.
For example:
Ann=5
Bob=3
Sandy=8
Zulu=1
If you search “Sandy”, you’ll get result “8″. Very quick :]
As a prize I selected an Apress book called “From Program to Product” – though I found it in PDF, it seems to be quite insightfull for me: we, developers, always think about code, and never about how to sell it. I have several product ideas, so I hope the book would help me to succeed.
P.S. Fun is that a few people emailed me to say how nice my new PHP Classes avatar is :] Thanks to Anton Dovgal for such a great picture of sad me.
Do you want to get a Mozilla Add-ons Developer T-shirt?
Recently I have received an email from Mozilla:
If you are able to achieve Firefox 3 beta 3 compatibility by March 18th on addons.mozilla.org, you are eligible for a Mozilla Add-ons Developer T-shirt. If you have updated your add-on, and would like a shirt, please fill out the following form:
Additionally, if your add-on is one of the top 50 most used add-ons by Firefox 3 users on the Firefox 3 release day, Mozilla will offer to sponsor (for an amount we will determine) a party for you and your friends. That is, Mozilla will chip in for you and your friends to celebrate your tools success! Mozilla will be in contact with the top add-ons shortly after the Firefox 3 release.
As for me, I have created a Get File Size plugin, and as soon as I did it, I have become eligible to fill a shipping form.
Here is a couple of links to help you on this way:
“I have only made this letter longer
because I have not had the time to make it shorter”
Blaise Pascal, Lettres provinciales.
What do you think you are supposed to do as developer? To create code? Nope. To delete it!
Have you ever thought why it takes 5-15 minutes to get into the flow? From my point of view, that’s because you have to understand the root of a task, to load its code base into your operating memory – brain. So the less code you have to deal with, the more productive you are in juggling with it.
Alongside this fact consider these statements:
Less software is easier to manage.
Less software reduces your codebase and that means less maintenance busywork (and a happier staff).
Less software lowers your cost of change so you can adapt quickly. You can change your mind without having to change boatloads of code.
Recent Comments