Posts

Showing posts from 2011

When to use a third-party library?

I recently had a debate on third-party libraries. There are people which when they need some new feature in the project, they instantly search on Google for some open-source library that implements what they need. They do that by default. There are some other people which when they need some new feature in the project, by default they imagine in their mind a sketch implementation for that. By default they think about implementing the feature by themselfs. So when should we use a 3rd party library? Here is my answer: - When the effort of implementing the new feature is considerable. - When there is enough trust in the creator of that 3rd party library. - When there is clear evidence that the library is widely used by others and there is a active community around it

How to remove first n lines from a text file?

On Linux is quite easy. tail -n +100 largefile.txt > largefile.txt.tmp mv largefile.txt.tmp largefile.txt The above sample will remove the first 100 lines.

What an architect should first think about

I'm currently reading the book Beautiful Architecture . In one of the chapters the author outlines what an architect should take into consideration when thinking of a new system. There are 9 things. Functionality What functionality does the product offer to its users? Changeability What changes may be needed in the software in the future, and what changes are unlikely and need not be especially easy to make in the future? Performance What will the performance of the product be? Capacity How many users will use the system simultaneously? How much data will the system need to store for its users? Ecosystem What interactions will the system have with other systems in the ecosystem in which it will be deployed? Modularity How is the task of writing the software organized into work assignments (modules), particularly modules that can be developed independently and that suit each other's needs precisely and easily? Buildability How can the software b...

Cool stuff about geo search and MySQL

If found some nice articles about performing geo queries on MySQL: http://www.rooftopsolutions.nl/blog/tag/rtree

Find the large files on Linux

Here is what I use to find the large files: find /usr -type f -size +20000k -exec ls -lh {} \; | awk '{ print $9 ": " $5 }'