PHP, Java, Algorithms, Databases, Misc.

UTF8 double encoding issues in web apps and MySQL

I have seen this issue many many times throughout my career so i thought it might be worth to go through it in details and help others.

If you have international content in your database and suddenly you see things like "é" or missing characters like "?" instead of "è" you may be in trouble. It is a symptom of lack of consistency in the ways you write, read and store unicode characters.

I hope my explanation, even that lengthy, will shed some light on the core of the problem and possible solutions :)

Screencast - phpProxyBuilder - proxy design pattern and AOP for PHP

I am very happy to share my first-ever screencast.

Screencast is about my open source project called phpProxyBuilder. It is a PHP library aimed at code reuse and promotion of proxy design pattern in PHP. It is heavily inspired by AOP and helps to implement cross-cutting concerns once and reuse the same code forever. It also promotes some of my favourite design principles like decoupling, testability, single responsibility and code reuse.

I wanted to create some screencasts for a while but I found it difficult to get the right tools. Fortunately screencasting and video editing are much easier on linux now and i hope to share more screencasts about PHP, open source and software design in the future :)

Review – Beautiful Teams

If I had to summarize this book with a single word it would have to be "disappointing". I had quite high hopes for it as I read some of the “beautiful” book series before and they were really good. Unfortunately beautiful teams is not that great at all. I am not sure who would I recommend it to anyone.

Review – The art of lean software development

The art of lean software is a very short book. I was really surprised when I got it delivered home. It is not a bad book though. Even that most of the practices are common sense nowadays I still people should spare few hours to read it.

I have seen too may people not following these common sense rules to discourage anyone from reading the book. Don't expect breakthrough, just a list of useful advice.

Review - Programming pearls

I have not read a book about computer algorithms for a long time now. I liked parts of the programming pearls and I disliked parts as well. I think it is worth going through the book if you are a software engineer. Especially if you want to get better at designing efficient software or if you want to practice on some non-trivial programming puzzles.

In general I think it is a a solid book.

Review - Team Geek, a software developer's guide to working well with others

That is a really exceptional book! You would expect googler's books to be good, but this one is really great. Don't waste time, just order a copy you wont regret it.

Team Geek is a great source of knowledge not just for leaders but for all the people who work with software engineers (or who are engineers themselves).

Review - MongoDB the definitive guide

I have read about mongodb quite a lot on-line last year and i also managed to pick up this book. I think it is a really easy to read and well written book. If you want to get some good basics on mongodb i think it is worth checking it out.

It is structured more like a tutorial / reference manual i guess as it focuses a lot on practical examples and usage of different commands.

Three things you should never do during a technical job interview

I have been in quite a few technical job interviews in recent years and I think I can see some patterns of why people fail. You can find a lot of guides on how to get the dream job or how to behave in the engineering interview but there are few tips on what not to do. I thought it may help some people in getting their dream jobs or maybe even becoming better engineers. Here are three simple things to avoid during the software engineer interview.

Cacti graphs generator class for custom metrics import

Cacti is an awesome tool but it requires quite a lot of manual work to setup new metrics measurement and begin graphing. As i am a total monitoring freak i love to have insight into different aspects of my applications. I love to export custom metrics and graph them in cacti but i found it too time consuming so i hacked a cacti graph and input method generator this weekend. The code is a bit primitive so please forgive me but i needed it to do just one particular thing it is not a multi purpose code really :)

I think some of you may find it useful as learning cacti for the first time and manually setting up custom graphs can be difficult so this script should help, check it out.

Three tips on how to become a better software engineer

Whenever I conduct job interviews for a while or go to interviews myself I realise how much is there to learn and how often we forget to stay sharp. Over the years I developed a personal regime that lets me stay reasonably up to date. As they say in China “sweat during peace so that you would not bleed during war”.

It would take a longer discussion to analyse my beliefs and explain better how was my career shaped but I think there are a few core advices that have worked for me so far.

Why ftp_get and ftp_nb_get may fail with a broken pipe error

That is just a quick hint about an issue i had today. I wasted so much time trying to find the cause of it when at the end it was just no space on the device!

If you have issue with ftp_get or ftp_nb_get and all you see in log is "ftp_get(): Transfer aborted. Broken pipe,,PHP code: 2" then it might be as in my case no space left for the target file!

Review - RabbitMQ in Action

First of all i would be lying if i said that i did not like RabbitMQ :) It is a pretty cool piece of software. Having said that, i could be a bit biased in favor of the technology but i will try my best to be objective here.

RabbitMQ in Action is a really nice book. I think Alvaro Videla and Jason Williams did very good job at describing how to use and leverage RabbitMQ in your web applications.

Yahoo!7 hack day - August 2012

Last week we had a Yahoo! winter hack day. It was my third hack day in Yahoo! and it was the best one so far! The hack party started at 5pm on Thursday. We hacked all night with some people working throughout the weekend as well.

2012 "winter hack day" was an amazing event. We got so much love from management teams and office folks. We produced over 20 super cool hacks with prototypes of mobile apps, internal tools and all sorts of freakn cool code. It was AWESOME! YO SYDNEY, YAHOO!7 IS IN DA HOUSE!

PHP stomp client customisation for RabbitMQ to properly ACK messages and disable prefetch

Just a quick post to help out anyone who might be stuck on this one. If you are trying to use PHP stomp client from fusesource together with rabbitmq stomp plugin you will probably get same issues that i did. Here are some notes that should help you solve the problem. Hopefully it will be integrated into the 2.0 client.

The sacrifice object pattern - a way of turning anti patterns into a pattern

While working with legacy applications and inherently dirty code you have to find creative ways to make things better. Rewriting / major re-factoring are usually not an option as team does not get enough time to do even basic housekeeping, what do you do then?

I have seen sphagetti code way too many times in my life not to call it an anti pattern. One of the main reasons for sphagetti code is allowing any object in the codebase to talk to any other object. In addition it comes hand in hand with usage of global/static scope and leaking information between application layers.

I recently realised that i have been applying the same pattern for a while now. The pattern i propose is an effort to cluster ugliness and relief rest of the code-base from exploding dependencies.

Syndicate content

About the author

Artur Ejsmont

Hi, my name is Artur Ejsmont,
welcome to my blog.

I am a passionate software engineer living in Sydney and working for Yahoo! Drop me a line or leave a comment.

Follow my RSS