Lease, rent or own

building house

I am married with a beautiful wife and an even cuter daughter. We have been renting an apartment for 4 years now and we are on the final stages of building a house. On top of that we need another car. We own a car which we paid for in cash. It was used, 2 years old with just over 10000km in mileage. Buying the used one knocked off 10000 euros from the retail price of the same model at the time of purchase. Now if I leased the car 4 years ago at a price of 250 euro per month I would have spent 12000 and now I could have upgraded to the newer model and keep paying the same lease price. I would also save more that 1500 Euro a year on service, tyres and repairs. So at the end of the day I would be 8000 down with a new car in my hands. I wouldn’t own it but since depreciation is a major factor no-one really owns a car.
Same with the house. I landed a pretty good deal and I am building at cost prices. A conventional house has a lifespan of 50 years. 50x12x500 euro rent is 300,000 in rent over 50 years. Without worrying about maintenance and repairs and with the choice of moving when you have annoying neighbours.

Essentially owning something is a privilege well deserved to anybody. Financially though leasing renting hiring is cheaper than owning. Many people find it hard to grasp this concept including myself. What got me to see things differently is the major reason people are willing to pay money for… Time and essentially to avoid being stressed. Wether stress comes from cleaning your house to financial management and to any other physical need. So next time you think you are investing in something huge like a house or a car think twice:)

Startup weekend Cyprus!

Well being a recent startup pivoter….. I quit my day job and joined a start up team 2 months ago !

This weekend I participated at startup weekend Cyprus.

We thought of an idea yesterday morning and we now have an alpha version at funbee.co ! We are about to do our presentation at university of Nicosia!!!

FIND_IN_SET. A handy little MySQL function

MariaDB MySQL

At AtYourService.com.cy we send a lot of emails. Especially when you compare it to the Cyprus market we send even more. Advocates of the Lean method we measure and report EVERYTHING. We even monitor some data real time. Reporting of a live table is a no go when you are running a real time application. So a lot of reports contain a lot of GROUP_CONCAT fields. When it comes to combinig these reprots with a semi hot table its kind of a mess to join over a field containing comma separated keys from another table.

SELECT * FROM 
table1,report_table2 
WHERE 
date BETWEEN 2015-01-01 AND NOW() 
AND table1.id in (x1,x2,x3)

But x1,x2,x3 is actually a text field in report_table2.

WHERE id in (table.field)

throws an error (well maybe not if the values are integers and MySql CASTs them to the first scalar value and if you are lucky the expression will evaluate to true if you hit the first one)

The solution?

SELECT * FROM 
table1,report_table2 
WHERE 
date BETWEEN 2015-01-01 AND NOW() 
AND FIND_IN_SET(table1.id,report_table2.field)

Maybe I should have known this but I didnt. It blew my mind and I thought I had to share.

Share your favourite MySQL function in the comments below