OCTests Halt because of UIFont fontwithname

During the testing of a `uiview` class, OCTest framework was insistent that it couldn’t process [UIFont fontWihtName] statements and halting the tests.

This is because logic-tests cannot test/load UIKit components directly. That’s why you should set up `Application Tests`. Detailed explanations are here on Apple’s Docs. But long story short following are the steps to set up application tests.

  • Set `Bundle Loader` to `$(BUILT_PRODUCTS_DIR)/<app_name>.app/<app_name>`
  • Set `Test Host` to `$(BUNDLE_LOADER)`

Also you can create `Logic Tests` target to do unit testing.

After I set that up, tests was seamless again. Woila.

Scanning Ports of a server

It’s something that you don’t want to do it all the time. But it’s handy:

nmap -v -sT yourip

My Experience at Seedcamp Istanbul

Seedcamp is Europe’s biggest micro-investor program, and luckily they organised a mini-event in the city where I live, Istanbul. My start-up ZulaMobile was chosen as a finalist to pitch at the event.

The process started with a preparation event a day before, attended by start-up companies, Yalim Gerger and Carlos Eduardo Espinal. It was surprising to see that half of the start-up companies didn’t show up because it was a massive help with the presentations. I though that my presentation was perfect but in fact, I had a long way to improve it. Seedcamp’s mentoring started even before the event.

The Mini-Seedcamp was scheduled to start at 12:30. I went out from home at 11:00 and barely made it at 12:30. Istanbul is a monstrous city. One and a half hours in traffic, on a regular day where everybody is supposed to be at work or at least not driving. I really think that people in Istanbul don’t work. Traffic is a huge production killer here.

When I entered the conference room, they said that the event was running  approximately an hour late. No surprise really. But I have to say that the organisation was pretty good. Especially refreshments were amazing.  Also everything was on time (except the initial delay).

It started with the intro speech by Carlos, then Anthony Douglas, the founder of a Seedcamp company “Hole19” talked about his experience at Seedcamp. After his presentation, I had a chance to talk with him, he was off to enjoy Istanbul. I advised him to take the ferry, public transportation to see how a regular day in Istanbul feels like. I wonder if he did and if he hates me for it.

Then the pitching session for start-up companies started. Sadly ZulaMobile was the last start-up to pitch due to the alphabetical order of companies. Each start-up had to do  a three minute presentation which limits them to say only what is necessary, concisely. I pitched ZulaMobile’s idea, a multi-platform mobile app-creator. It felt really great to see the attention of the audience.

After the pitching the panel forum had started. Emre Kurttepeli explained why he’s more excited about `sexy` start-ups and why Turkish companies need to scale globally. Sidar Sahin, founder of Peak Games, talked about his experiences too.

Sean Park‘s talk at the end of the event was the greatest for me since he was addressing issues that I’m facing in the course of my entrepreneurship. He was saying that one should position himself around skilled, passionate people and learns to delegate things when necessary. And being an entrepreneur  can be really painful for people who aren’t cut out to be one.

I can say that the highlight of my day was the networking session, I met lots of people and more importantly, I received invaluable feedback on ZulaMobile. Some of them are ideas that possibly will shape the future of Zula, and validation that we’re on the right path.

I am really satisfied with the event and the experience that I had. I thank Yalim Gerger and Carlos Espinal for making this day happen, and thank all the start-ups that supported each other.

Alogaranti sifresi ile imtihanim

Disclaimer: This time the post is going to be in Turkish since the issue is specifically related to Turkey.

Garanti bankasi beni delirtiyor gercekten. Iste onlara attigim mail:

Merhaba, Arabami sattigim icin ogs'yi iptal ettirmek istiyorum. Internet subesinde menusunu bulamadim. Alogaranti'yi denedim.

Alogaranti sifresi lazimmis, sifre almaya basvusdum, parola verdiler ancak sifre vermediler. Bu parolayi musteri temsilcisi ile yapacagim islemde kullanacakmisim. Ancak sifre olmadan musteri temsilcisine ulasilamiyor ve sonsuz donguye giriyor sistem. OGS icin konusmak istedigimde bana alogaranti sifresi soruyor. Sadece musteri temsilcisi dedigimde hattaki kisi beni tekrar alogaranti sifre alma menusune bagliyor, boylece bir tane daha parola aliyorum ama asla sifre alamiyorum.

Normalden uzun bir mesaj oldu, buraya kadar okuduysaniz tesekkur ediyorum. Sadece yol gostermenizi istiyorum. Ne yapabilirim acaba? Internet subesini kullanamiyorum, cep hattini kullanamiyorum. Gunduz vakitlerinde calistigim icin bankaya gitmek istemiyorum.

Tesekkurler
Edit:

Basardim.  Alogaranti sifresi dedikleri sey, aslinda cep telefonundaki `CepSifrematik` ismindeki programla uretilen sifreymis. Oyleyse parola’ya ne gerek var? Belli ki takildiklari nokta tutarli terminoloji kullanmamak. Eminim banka calisanlari alogaranti sifresi ve cepsifrematik sifresinin ayni sey oldugunu biliyorlar. Ancak ben bilmiyordum.

UseCase’ler ise bir diger problem. Internet subesi kullanirken cepsifrematik sifresi gercekten cok kullanisli. Ancak telefonla konusurken gorusme sirasinda once cepsifrematik uygulamasini acik sifre uretmek, sonra mesajlar uygulamasini acip parolayi okumak gerekiyor. Evde rahat yaptim, ama muhtemelen disarida olsaydim yapamayacaktim.

Yine de basardigim icin mutluyum.

Experiment – Discipline my working hours for 21 days

Inspired by this blog, I decided to do an experiment in my life to control the way I work and my working hours. I have discipline problem and I find it very difficult to start work on time. Also I can be easily distracted during work. As 1st step, I’ve disabled my facebook account. And secondly, I set following rules:

  • Start work at 9:00
  • Lunch break 13:00 to 14:00
  • Stop at 18:00
  • No social media/games, no external distractions, put the phone on silence and reply at lunch breaks. Focus on the actual work.
  • Track the software usages times to see where I spend most of my time.
  • Write things that I achieved during this period and compare it with the existing plan
  • Analyse the results in the last 30 mins

I will apply these set of rules for 21 days. Will I be able to follow it or am I too lazy to discipline myself?

 

 

My 1st day, partly successful, I started at 10:07 and finished at 19:10. Following are the apps that I used during this period:

Application | Total Time
——————————————
Xcode | 3:49:27.416812
Google Chrome | 1:35:55.517225
loginwindow | 0:51:44.000723
iOS Simulator | 0:34:19.153890
Terminal | 0:23:27.191458
Mail | 0:18:27.647030
Finder | 0:05:16.241329
Stone Hill Time Card | 0:02:54.275088
KeePassX | 0:00:55.204544
Alfred | 0:00:41.310151
Activity Monitor | 0:00:33.840339
Dictionary | 0:00:04.427524
Wunderlist | 0:00:02.616036
Time Out Break | 0:00:01.412293
UserNotificationCenter | 0:00:01.408077

 

How to add a video to ios iPhone/iPad simulator

It’s annoying that I couldn’t test the app for picking the video from the library. Basically I want to choose a video file from the library and upload it to my server. Naturally I tried to download some video files using the build-in browser, Safari with no luck. I even tried to put the video to the app location in the file system, didn’t work.

Here is the solution:

Copy the m4v file to the app’s `Documents` directory, should be something like: `~/Library/Application Support/iPhone Simulator/6.0/Applications//Documents`. And then run the following code in your application. Since this is a temporary code to run, you can put anywhere you like in the app, make sure that you delete it when you’re done.

NSString *path = [NSHomeDirectory() stringByAppendingPathComponent:[NSString stringWithFormat:@"Documents/mymovie.m4v"]];
    UISaveVideoAtPathToSavedPhotosAlbum(path, self, @selector(video:didFinishSavingWithError:contextInfo:), nil);

To capture the error, you need to add the following method

- (void)video:(NSString *)videoPath didFinishSavingWithError:(NSError *)error contextInfo:(void *)contextInfo
{
    if (error != nil) {
        NSLog(@"Error: %@", error);
    }
}

That’s it. Now you have the video file on your `Photos` app under `Saved Photos`.

I have seen this solution at this StackOverflow page.

 

Updating PyPi Packages

Updating existing pypi packages to a newer version? Although extremely simple, I always forget how was it. So here is the trick:

Create distribution file, register and upload it.

 

python setup.py sdist
python setup.py register
python setup.py sdist upload

Here is more info

iOS Pdf Readers Comparison

I wanted to use an open-source pdf reader for an iPad-only application. I’ve tried following projects.

iOS-PDF-Reader

This reader uses UIPageViewController for its transitions (curl) effect. It has a progressive way of loading the pdf page. Honestly I didn’t like those effects. This is my least favorite one. Download

VFR Reader

So far the best one. Very smooth and responsive. It has a sample application. It looks like it’s the best option. Download

FastPdfKit

This one is not free, but with a splash page you can use it. I’ve cloned the git repository, and wtf? it’s 198mb. For a pdf component this is clearly overkill. It has sample apps, sample pdf files and everything in it. It has lots of cool features like searching, double-single page view, download management etc. But having a splash-page is not acceptable for my solution now.

My choice is VRF Reader.

Acoustic Guitar Strings Update: Elixir

I have changed my strings to Elixir. Very light and has a good tone. I enjoy playing. Only thing annoys me is the lack of sustain. I use .10 as shown in the image below

Elixir

Best music albums of 2012

This is the list of best music albums that I enjoy most in 2012. It’s really difficult to find good music in recent years, but I can say that 2012 was moderately fine year.

1. Dry the river – Shallow Bed

This is an amazing album. Amazing sound, lyrics, everything is good about this album. Definitely the number one of this year.

2. Circa Survive – Violent Waves

I bought this album as a pre-order from their website after a long last waiting. But they fulfilled my anticipation. I am a huge fan at the end of the day, and I am very happy to see circa survive released a rock-solid album which has many great songs in it. They self-produced this album. Recording quality is great. Not the best piece on their discography, but still it was a great enjoyment of the year.

3. Mumford and Sons – Sigh No More

Perhaps this album is released in 2010, I have discovered it in 2012 and it made my days for so long. It’s rare for me to like an album that has positive songs with christian vibes, I felt a dense emotional stream from this album. Great nonetheless. Its amazing sound is the bonus. I deliberately didn’t listen to their latest stuff, Babel yet. I refuse to consume everything in one go.

4. Katatonia – Dead End Kings

A great return from Katatonia after their crappy album “Night is the day”. Every band should have a shitty album in their discography, and Katatonia fed that need. Dead End Kings on the other hand, is a mixture of their 90′s albums and their new progressive style. Very melancholic and sad as usual as they extend their musical mastery with more progressive compositions. Seeing Tool influence made me smile. I definitely enjoyed this album this year.

5. The Smiths

Isn’t it a shame that I just discovered them in 2012. They occupied my music player for a long time in 2012