Sunday, November 11, 2012

The Way It Has Been


The sun is high in the sky on a late autumn morning. The large bazaar is open down the street, and cars and trucks line the road in all directions. A man is calling out, 'Nuts! Walnuts!', and he stands patiently next to his handcart, loaded full of his walnuts.

The call of the muezzin echos through the neighborhoods, the tinny speakers carrying his sad song of joy into the homes of all around him. He sits in a mosque far away from where the speakers beckon the worshippers. He had sipped on some tea to moisten his throat before his song. His Koran was open and on the table in front of him, next to the telephone handset which served as a microphone and sent his voice into many mosques around the district. Though each mosque has their own muezzin to lead prayers, its less discordant to have a single voice heard for kilometers around, rather than the competing discordant sounds of calls. If one wishes to have discordant calls, one can go into the Old Town.

Before the song is even completed, old men begin to wander down to the little mosque, nestled between the apartment buildings here near the heart of the city. At this time of day, the old men are the only patrons of Allah, waiting between television programs and games of backgammon for their call to move and show their faith, the march of those who have no direction, no job, and stay close to home. Only the oldest men cover their head with skullcaps, but none of them are younger than 40 years of age.

Going the opposite direction are women. Some are old and bent nearly in half with age, some are young, many with daughters to help them, but all are walking to the bazaar and most all of them wear the scarf. Many have carts with them to carry back their treasures, which they hope will last through to the next bazaar. If a meal requires onions, and they have no onions, they will not cook that dish until the next bazaar allows them to restock their cupboards. This is the way it is.

There are modern grocers scattered about. Many of the small stores, what we would call mini-marts in the west, sell eggs, juice, fruit, and canned goods. For the modern Turk, one doesn't have to walk far to get the staples needed for a meal. Fresh loaves of bread, with hard crusts and soft crumb, is hanging in baskets and stacked neatly in display cases at every store. But the traditional women of the new city do not like to purchase their goods at a grocer - instead, they tighten their scarf and walk to the bazaar, where fresh goods are brought in from around the surrounding countryside to be sold, bargained for, and traded, as this is the preferred way to purchase food.

There are stacks of tomatos, onions, leafy greens in all shapes and sizes, and the long and mild peppers that the Turks love so much. There are large wodden boxes full of oranges of every shape and size, apples, pears, tangerines, cherries, grapes, and lemons, and even the occassional seller of strawberries. There are walnuts, almonds, pistachios, and peanuts. Roasted and fresh. Sweet, salty, or plain. In the shell, or not. 'Fresh tomatos! The freshest tomatos here! Good price!', you will here at every third stall.

There are people selling sheep, both alive and butchered, and the scent of rotting vegetables and the musk of animal is nearly overpowering. People are packed in, shoulder to shoulder, going here and there, haggling, arguing, laughing, and looking for the best price. No cost is fixed - everything is negotiable, but to get the best deal, you must ask around and listen for the sellers who are trying to offload quickly as you can drive their price even lower.

The bazaar is a three-floor open sided building, dark and oppressive from the outside, even in the midday sun. Once inside, the lighting is adequate to see that you are indeed purchasing an orange instead of a lemon.

There are sellers of leather goods, knock-off designer sunglasses, and the occassional candy and sweet sellers.

By the time one old woman finally reached the bazaar, her husband had already finished praying. After he stands from kneeling for prayers, he straightens his clothes and walks into the courtyard of the mosque. He puts his shoes on and calls out to a group of men. He walks up to kiss his friends and smoke a cigarette. They chat for a while about the latest soccer match, discuss politics, take turns lamenting their pain over the recent death of their friend. A few of them manage to break out some tears, and only one man is heartless enough to say 'He drank too much, he had turned his eyes from Allah.'

His funeral had been the previous day at this same mosque. His body had been prepared and wrapped in linens and put on display as verses from the Koran were read. His widow weeping loudly and crying out her pain and loss. He had no other family, or at least none of them showed up to mourne. This is also the 10th of November, the national day of mourning for the death of the Republic's hero, Ataturk.

After a respectful time of mourning and remembering their old friend, they then walk together to the local game house were the clinking sound of okey tiles and backgammon pieces can be heard drifting through the clouds of smoke and laughter, late into the night. He will rise again with many of his friend in a couple of hours time and walk again to the mosque, to kneel and worship as proscribed in the Koran. He may return home to eat the meal his wife has cooked for him, but he'll return to the game house afterwards to count away the hours until sleep will take him.

Saturday, November 10, 2012

Modern Web Programming in Perl

I created my first webpage back in the late 90's using some silly site generator. Not long after I generated the code, I had to make some changes and the HTML was absolutely AWFUL. I couldn't understand it and it looked nothing like the examples in the book I was reading! This spurred me to learn HTML.

A few years later I was getting proficient with perl and realized I could use CGI to generate HTML! Neat! I wrote some code and adapted a chatter bot I found and soon had a webpage where I could chat with my page, and I didn't have to maintain a bunch of HTML files. The code quickly became a nest of 'if this param or session variable, do this' and I lost interest in the project because it was so difficult to maintain.

I used CGI (and later, CGI::Application) for various projects over the years but have not had to do any web coding for a number of years now. I hadn't bothered to really learn anything new either.

My most recent employment experience had me working on a project that started as a simple perl script and quickly spiraled into a full-fledged back-office web-app. CGI and its family didn't take enough of the complexity out of the code and it quickly became a nightmare to change anything.

I've been using Mojolicious this past year as my stepping stone into modern MVC design. Its quite a nice framework. Dancer and Catalyst seem to be quite popular  but I liked Mojo because all the tools I needed were integrated. I've had problems with some CPAN modules not playing nicely, and I was attracted to the idea that all the web tools I'd need (session/cookie management, config usage, helpers and plugins, DB accessors) were all 'baked in'.

I'm working on a large-ish project now and have been using Mojolicious for it.

One of the quotes on their website says this:

Duct tape for the HTML5 web - Web development for humans, making hard things possible and everything fun.

Fun is a matter of perspective, but its a pleasure to work with, and I quite enjoy it. If you're a perl coder and are looking at Rails with envy, take a look at Mojolicious. It has everything you'd need to quickly get a true MVC app up and running with a minimal amount of effort. The documentation is quite good, ok, its not perfect, but the author and maintainers are quite responsive on the mailing list and there have been no features I couldn't understand or get working without reading through the docs.

Take a look, take it for a spin, its easy to write a 'lite' application and turn it into a full-fledged app. It runs under its own threaded app server (hypnotoad), or can be run with fast_cgi, behind nginx/apache, and is quite flexible. If you end up using it, I hope you enjoy it as much as I have.

Friday, November 2, 2012

The Source of Contentment

I'm reading 'My Name is Red' by Orhan Pamuk. This is the English translation, my Türkçe is nowhere near good enough to read the original. He won the Nobel Prize in Literature in 2006 for this book, justifiably so, it's a beautifully written historical mystery book, its inspiring and haunting with thickly layered themes and perspectives, and takes place in Istanbul in the same neighborhoods where I've spent a few weeks and its answering a question for me - 'What was this place like in the days of the Sultanate?' I've been to many of the locations that this book takes place in, and this is making the book so real in my mind that I feel as if I can hear the sounds of the street vendors hawking their wares.

If you haven't read this book I highly recommend it. 'My Name is Red' is one of the few books I've read recently that absolutely envelopes you with prose and imagery and transports you into a poetic world of the authors creation.

There is a parable being related by a master illustrator as they examine books of illustrations in the treasury of the Sultan's Palace - it made me laugh and stop and think about it for a long while. Below is the story which I have shamelessly typed up from the book - the master is relating this story to two others who are looking at an illustration with him:

"This is the work of Lütfi of Bukhara whose ill-temper and belligerence caused him to leave each of his illustrations half-finished; he fought with every shah and khan claiming that they understood nothing of painting, and he never remained in one city for long. This great master went from one shah's palace to another, from city to city, quarreling all the way, never able to find a ruler whose book was deserving of his talents, until he ended up in the workshop of an inconsequential chieftain who ruled over nothing but bare mountaintops. Claiming that 'the khan's dominions might be small, but he knows painting!', he spent the remaining twenty-five years of his life there. Whether he ever knew that this inconsequential lord was blind remains, even today, a subject of conjecture and source of humor."

Thursday, October 25, 2012

Kurban Bayram, the Festival of Sacrifice

Bayramınız mübarek olsun!


Muslims across the world today are celebrating Eid al-Adha, or the Festival of Sacrifice. In turkish it is called Kurban Bayramı. The blood and candy flow freely today, and the feeling in the air is one of excitement and joy. The religious meaning is a rememberance of the sacrifice Abraham made after Allah spared Ishmael due to their faith and devotion to his commandmens. Eid al-Adha on wikipedia

A small child who lives in this building knocked on the door an hour ago. He wanted to give me a traditional greeting that a child gives an elder. He took my hand and kissed it, and then held it to his forehead. I know I'm supposed to kiss him on the cheeks afterwards but he ran off very quickly! I believe I should have given him some money or candy, but it happened quickly and I was quite unprepared.

Today is the day when you can walk outside in a Muslim nation and see people bending over a tied-up lamb or ram and slicing its throat.

In Turkey, the municipalities set up public areas where people can gather to do this - its quite bloody when you slaughter an animal and halal requires specific steps, and this was done to try and isolate both the mess and tourists from each other. In years past, I was told it was common to see a sacrifice taking place on every corner, but today I've only seen a few families sacrificing on their porches or on the side of their apartment building. The open lots reserved for bayram are *packed* with people and animals.

Islamic law requires that the throat of the animal is cut, leaving the spine intact, and the blood is then drained. Death occurs quickly this way. After the blood is drained, the head of the animal is severed and is lined up towards qibla (mecca) while the butchering occurs.

There are people walking home with buckets of meat, and children seem to be quite excited - judging by the amount of Bayram candy I saw for sale, the children are most likely looking forward to this and the feasts that will occur this evening, as well as seeing cousins and friends and having some time off from school. Family and friends gather together to celebrate the sacrifice and there is a sense of excitement about the event.



As a foreigner, this is about as...foreign..as it gets for me. In the west we are incredibly sheltered from the food chain, and I doubt any one who doesn't live on a farm has ever seen an animal slaughtered. There is great respect for the animal, but as this is my first time seeing such things, its definitely making me feel very odd and a bit wrong. Perhaps its because the head seems to watch over its own butchering. I can now hear singing outside and the laughter of children.

Of course any discomfort I feel means I'm a bit of a hypocrite as I can smell the feast beginning to cook in the kitchen and I'm quite looking forward to some very tasty food.

Tuesday, October 23, 2012

Freedom to be a hypocrite



This is just a rant. This is only a rant. Had this been an actual essay I would include more cursing - but I don't care, I'm just letting off steam.


Someone today told me I was being offensive towards their beliefs and to stop it (a christian! a mormon!! on facebook!!!!!).


The 'freedom of speech' cuts both ways. You have the right to say what you want. That means people have the right to say they are offended and ask you to stop. Notice I never said that you 'have to do' anything, just that in America, people have the right to say what they will. Especially on Facebook - block me! Don't read it!


I insulted Mormonism on a friends Facebook post - the post itself was 'insulting' to Mormons only because of how accurate it is and this friend had a Mormon friend who took affront to my biting comment, but not at the picture... I'll include the picture below because its just so awful and true at the same time:






I was told I was being offensive and should stop, by a Mormon who likes Fox News and is a self-declared Conservative who likes Hannity. These are the class of people who were most offended by the offense Muslims took at the Mohammed insult videos. "Freedom of speech", they cried! "Don't watch it" they yelled!


If you want to accept your freedom to say what you want, then accept that other people will have it to, and will insult you for silly beliefs - I mean, this a religion which says in no uncertain terms that 'hot drinks are not for the body or belly' - and yet they all drink hot cocoa.


That's why this is only a fake rant, how can you really take anyone seriously that believes there is a planet on the other side of the sun that we can't see?


I don't care who is president. They are all ineffective and political at this point.

Friday, October 19, 2012

Brand Recognition

I am residing in Turkey, and was sitting and drinking a latte at my favorite coffeehouse near a popular tourist intersection. On my way to get the latte, I noticed a T-shirt with an American Flag and another with an Apple logo.

I decided to play a little game I call 'Count The Logos'. In about 30 minutes, I watched all the people walk by, an even mix of Turks and foreigners. If you're into marketing foreign brands in Turkey, especially American Brands, this blog post is for you.

Here is a list of the brands I recognized and the total count for those logos:

#1 - Adidas - 43 items of clothing, mostly shoes with a random shirt/sport trousers/bag thrown in.

The local boys at the coffee shop were enjoying this game and helping me spot logos. At the end I gave them the count and they said 'Adidas is popular because they are the cheapest'. I'm guessing they mean cheapest of the Big Brands as I see non-mainstream shoes or knock-offs that are incredibly cheap.

#2 - Nike - 42 items of clothing, mostly shoes with a few shirts here and there.

Interestingly enough, Nike and Adidas were nearly tied for the top place.

#3 - Converse - 28, all shoes except for two t-shirts

There may have been  more as I saw many 'Converse-like' shoes, but if I didn't see a logo, I didn't count them.

From here, the counts drop dramatically.

#4 - Reebok - 16
#5 - Puma - 7

The top five places are all Shoe/Sport manufacturers. Hmm...

#6 - Lacosste - 6

These were all shirts with the little crocodile head logo on them

Tied at # 7

The American Flag - 5
Levi's - 5
LC Waikiki - 5

I did see a flag with Mickey Mouse on it, so I counted the logo for each one, and at this point I consider the Stars and Stripes an American Logo. LC Waikiki is the only major turkish brand I recognized. There may have been many pairs of Levi's Jeans, but I only counted T-shirts with the logo on it as I couldn't really ensure the brand logo on jeans.

Tied at #10

McDonalds - 3
FILA - 3

McDonald's brand was on cups of ice cream. McDonalds Ice Cream is heavily marketed here and they have many different  types of sundaes and other things here that they don't have in the USA.

Tied at #12

Hollister - 2
New York - 2
California - 2
Mickey Mouse - 2
Minney Mouse - 2
Los Angeles - 2
Hello Kitty - 2

Now we're getting into non-clothing brands. The US cities and states (NY/NYC/LA/CA) are a brand, make no mistake, these are the most recognizable US places to every non-american.

The rest all had a single showing:

Hollywood
Miami Heat
Apple
Smurfs (Papa Smurf)
Pacifico
Sketcher
America (Just the word, no flag)
Polaris
Legend
US Navy
Heritage
Batman
Coca-Cola
Unlimited Eagles
'Girls Just Wanna Have Fun' lyrics
Loft
Replay
Miller (beer)
Native American Chief Headress
American Football (Mauraders??)
Scarface
Spiderman
Grand ol Opry
Pacific Area
'Rock and Roll never dies'
Reno
Gold Rush
No Fear
Ford
Super Mario
Jansport
Newport Beach
Las Vegas
New Balance
Popeye
Madonna
Ferrari

I'm probably biased towards the American  brands, but to be fair there were a LOT of American Brands.

Tuesday, August 28, 2012

New Laptop time! System76 Gazelle Pro..

I needed a new laptop and decided I wanted a system that was as guaranteed as possible to run out of the box with all hardware components working with zero configuration hassle.

I went with System76 and ordered their Gazelle Professional 15.6" laptop. Their website is simple, but intuitive, and configuration was a breeze. My requirements were simple:
 - It Just Works in Linux.
 - 16GB or more of RAM
 - Ordered with 2 drives
 - Core i7
 - 1080p
 - 15.6" or smaller
 - $1000, +\- 10%

Their RAM upgrade on their website was a bit pricey, so I opted for the minimum, a single 4GB DIMM and a matched pair of after market 2x8GB. Replacing the RAM was a snap, and I notice its a socketed and (for a laptop) easily replaceable CPU. I got 2x500GB Seagate 7200 RPM drives, with the nifty hybrid 4GB SSD on drive cache. Linux aggressively caches as much as it can in RAM, so the "on subsequent loads" for commonly used apps isn't as apparent, especially with the entire OS loaded on a RAID1. Hey, its a laptop, they are spindles, and I want redundancy over write speed. But reads are nice and quick.

I rebooted the OS a bunch of times, and by the sixth time the boot time had dropped from ~12 seconds down to ~7 seconds, so perhaps that was a good idea.

I also have a keyboard that doesn't have a Windows logo on the meta key!! Too bad its a sticker, and too bad its off center by a millimeter! But I don't look at it that often, but its still a bit annoying - just not annoying enough to send it back.



System76 themselves have been great - they open a support case with you that gives you the current information and status of your order - once the order has been processed, you then get a message when its being built, then a shipping number and S/N(s) of your product(s). Its a social-networking sort of support system, with avatars and such. It makes you feel like there is a real person handling your expensive new gear.

They ship with Ubuntu, but as I used Fedora for work and don't like the context switch of yum/apt and other stuff like that, I reinstalled and had zero problems with any devices. The laptop is very fast, and indeed, everything works Out Of The Box. HDMI with audio passthrough worked with zero configuration, other than having to enable the HDMI profile in KDE (a GUI only feat, nice!)

Blue tooth had a weird setting in the BIOS and was disabled, but once that was enabled it worked just fine. All the OSD animations for volume and brightness and such work great. Standby works as well, and all wireless devices seem to resume their sessions on wakeup.

Things I don't like:
 - limited accessories selection, lack of international power adapters, lack of 9 cell battery
 - off-center Ubuntu logo
 - The touchpad - Ok this is a a toss-up. It doesn't have any vertical physical presence indicators - its smooth and hard to know when you've reached the edge of the pad, but otherwise it works fine and I do like it visually.
 - Heat under the left palm - its not too awful, and I have a laptop chiller.
 - Lack of sensors (or lack of support in lmsensors) - haven't investigated too far, but I simply have CPU temperatures and no voltages/fans or anything else.
 - lack of choice for illuminated keyboard - I'd pay extra for this as well!
 - lack of choice for nvidia/ati discreet adaptors. I'm guessing this is either due to their suppliers lack of models, or the lack of good support for that switchable technology all the new chipsets use.

Hopefully the graphics situation will be remedied by the next time I purchase a laptop, I didn't want an Nvidia or ATI solution this time. An intel 4000 series graphics experience is enough for me. It played a 1080p movie beautifully and only showed some vertical slashing, and 99% of my time will be spent programming and office work, with movies and music sprinkled here and there.

But even these things negative aren't enough to stop me from really liking this laptop - its lightning fast, has a better display than even my last Macbook (early 2011), has no Windows Logo, has a support forums on the official Ubuntu Forums, is easily upgradeable and workable, and I'm supporting a company that doesn't seem to act like every other hardware vendor.