Tumgik
mathijskadijk · 8 years
Text
Why I love working at Q42
The yearly, super awesome, Q42 christmas party was last friday. It’s my second since I’m working at Q42 for 2 years now. I really enjoy my time at Q42, mainly because of three things:
Autonomy
Mastery
Purpose & Party
Autonomy
The projects we do, the techniques we use and the approach we take on projects are open for discussion by everybody. Reasonable arguments are always considered, no matter if they’re made by an intern or managing partner. There is no one dictating how you should do your work and often even the features requested by the client are up for discussion.
Deciding with your team, including the client, on what technique your going to use, how you’re going to approach the project and what the most important goals are really makes everybody owner of the proces. This autonomy also results in people that are really committed to solving problems and making a great project.
Mastery
All that autonomy is great, but you need the right people in the right place to be able to let them choose how to work. I’m still wondering how so many smart people can end up in one place. All people working at Q42 are really really great at something. This mastery makes it easy to trust someone.
Constant learning is as important as having smart people around. Not only do we have colleagues that are very eager to learn new stuff, there is actually time built into the planning of every employee to do whatever you think you should do for half a day every other week. People learn new programming languages, crack hard problems and create libraries in that time.
It’s really a pleasure to work with great people that are working hard to get even better!
Purpose & Party
Besides a lot of control over your own work, great people to work with and room to improve yourself there is something else; Purpose. It’s nice to work on things that you really believe in.
We try to do projects that matter, projects about better learning experiences for kids or blind people going to the cinema are really seen as valuable and important. The company would rather do an extra project like this, than go for more profit. Working on project like that or even seeing colleagues work on them really gives you a motivational boost.
Besides meaningful projects it’s also great to see how nice it is to be together outside of work. The amazing yearly retreat, the christmas party and the spontaneous activities organized by the employees themselves like tasting special beers or playing offline games. Those things make Q42 so much more then just a place to work.
1 note · View note
mathijskadijk · 8 years
Text
Another blog I wrote on our company blog. :)
What to do when shit hits the fan
One day I found myself looking at a giant spike of crash logs in our monitoring tool. A quarter of all users had a crash on launch when they tried to start the new version of our app. We made a mistake in migrating users to a new data model. The one star reviews came in, angry tweets started appearing all over the place and customer support calls shot up. I found myself in a classic “shit hits the fan”-moment.
Everybody encounters moments like this every once in awhile. It can be quite stressful and it might seriously piss off the client you work for. Going through mistakes like this I learned that you never should jump to a “no mistakes allowed”-style of working. You can’t avoid all mistakes, it’s all about how you handle the issue. If you do that right, you might even end up with a compliment instead of an angry person on the other end of the line.
Keep reading
1 note · View note
mathijskadijk · 8 years
Text
Wrote an article about Bitcode on our company blog. :)
Why I embrace Bitcode
Last week I was enabling Bitcode for the PostNL app we develop. Bitcode is a new technology from Apple that optimizes your app by recompiling it in the cloud with optimizations for the specific device that downloads it, making the app smaller and faster on the user’s device. Later that week I stumbled upon the blogpost “To Bitcode, or Not to Bitcode?” by David Wheeler.
His recommendation on Bitcode is to “wait and see”, because of potential security issues and the possibility of irreproducible bugs. Of course some of us are forced to use libraries that don’t support Bitcode and some of us want to write inline assembly, so those could be valid arguments to temporarily disable Bitcode. All his other arguments do not impress me very much and I believe they shouldn’t scare you either.
Take for example the fear of hackers injecting code into your app. You already submit your apps to Apple. If hackers are so deeply embedded in Apple’s infrastructure that they can control the (re)compilation process, they will have so many other ways of modifying or getting your apps’ data that disabling Bitcode really won’t matter. Besides, I would be more worried of your own developers having malware on their computers, like modified Xcode versions, than Apple being hacked at this level.
Irreproducible bugs due to extra optimizations would be Apple’s own worst nightmare. It would be very bad for customer satisfaction. So you can bet Apple is going to great lengths to prevent apps from crashing. Most code iOS developers write is not so low level that compiler optimizations would affect it in a way that makes it crash. If you write code that stops working when you change compiler optimizations, you’re either doing it wrong or you have found a serious compiler bug. If you happen to be that one person to run into that very specific issue, you can always disable Bitcode as a workaround and report the issue to Apple.
I believe new technologies like Bitcode help us move forward. Bitcode helps us worry less about the small things and gives us more time to develop stunning user experiences. We shouldn’t “wait and see” how things play out, but embrace change and explore how it makes our apps better.
This also touches on a broader point. I think developers should help the business they work for move forward. Develop for the future and where the technology will be going, not for the past. Apple is committed to technologies like Swift and Bitcode. They make them available to us so we can make better apps for our users and will continue to improve them. Embrace change, make your apps even better than they already are and don’t fear Bitcode or any other technology that makes your app better for your users.
1 note · View note
mathijskadijk · 9 years
Text
The bundle couldn’t be loaded because it is damaged or missing necessary resources.
If XCode throws that into your face serval things could be wrong, some are easily found on Google/StackOverflow. Unfortunately none of the proposed solutions over there worked for me, so I've gone back in history one commit at a time to see where I broke this...
Long story short; One of my classes now imports UIKit, my tests don't import UIKit and this triggers XCode to create an invalid test bundle. After some fiddling around I found that adding import UIKit in one of my test classes fixes this. My tests run like charm again.
One importent catch with this issue is that once one valid bundle is created XCode will keep creating valid bundles until you do a clean build. So this is why I only noticed this issue only after some time.
Importing UIKit in the tests was a simple solution for this XCode bug and adding it will prevent you from seeing this error over and over again:
2014-11-01 17:15:20.120 xctest[60524:4986818] The test bundle at .../Library/Developer/Xcode/DerivedData/.../Build/Products/Debug-iphonesimulator/CoreDataKitTests.xctest could not be loaded because an unanticipated error occurred. 2014-11-01 17:15:20.121 xctest[60524:4986818] Detailed error information: Error Domain=NSCocoaErrorDomain Code=3587 "The bundle “CoreDataKitTests” couldn’t be loaded because it is damaged or missing necessary resources." (dlopen_preflight(.../Library/Developer/Xcode/DerivedData/.../Build/Products/Debug-iphonesimulator/CoreDataKitTests.xctest/CoreDataKitTests): Library not loaded: @rpath/libswiftCoreImage.dylib Referenced from: .../Library/Developer/Xcode/DerivedData/.../Build/Products/Debug-iphonesimulator/CoreDataKit.framework/CoreDataKit Reason: image not found) UserInfo=0x7af2b1b0 {NSLocalizedRecoverySuggestion=Try reinstalling the bundle., NSFilePath=.../Library/Developer/Xcode/DerivedData/.../Build/Products/Debug-iphonesimulator/CoreDataKitTests.xctest/CoreDataKitTests, NSLocalizedFailureReason=The bundle is damaged or missing necessary resources., NSLocalizedDescription=The bundle “CoreDataKitTests” couldn’t be loaded because it is damaged or missing necessary resources., NSDebugDescription=dlopen_preflight(.../Library/Developer/Xcode/DerivedData/.../Build/Products/Debug-iphonesimulator/CoreDataKitTests.xctest/CoreDataKitTests): Library not loaded: @rpath/libswiftCoreImage.dylib Referenced from: .../Library/Developer/Xcode/DerivedData/.../Build/Products/Debug-iphonesimulator/CoreDataKit.framework/CoreDataKit Reason: image not found, NSBundlePath=.../Library/Developer/Xcode/DerivedData/.../Build/Products/Debug-iphonesimulator/CoreDataKitTests.xctest} Program ended with exit code: 1 *** Test session exited(1) without checking in. If you believe this error represents a bug, please attach the log file at /var/folders/cf/_3xf_8md43s3cd5b05pw08sh0000gn/T/com.apple.dt.XCTest-status/Session-2014-11-01_17:15:16-2IR12h.log
0 notes
mathijskadijk · 10 years
Text
Auto-generating Docsets for your own iOS project
tl;dr: You also should generate XCode/Dash compatible documentation from your own projects! It's easy, check out the "Hands on" paragraph.
Intro
Let me start with a little confession, I never write "javadoc" style comments in my iOS projects. Why? Well because I never look back at them, it's not easy enough to browse, search and jump through these docs. I'm just as fast reading/searching through the code.
But I love good "javadoc"-style documented CocoaPods. Why? Well I can look them up on CocoaDocs.org and load them all into Dash (or XCode docs) easily. Together with the XCode Dash plugin I alt-click right into the docs, way easier and faster then reading and searching through code.
If I could make it just as easy to browse through docs of my own projects, the "javadoc" comments would actually be used and add value. I would write them and develops that are new on the project would have great docs to see what is doing what!
So today I fixed auto-generated docs for my own projects!
Hands on
Install Appledoc
First off we install Appledoc to generate Apple style documentation, I would recommend installing the latest binary release from Github or just follow the compile and install instructions in the Readme.
XCode build script
Now let's XCode generate documentation whenever we build:
Click on your project
Select your target from the left pane
Click the little plus
Choose "New Run Script Build Phase"
Tumblr media
Now we're ready to feed XCode the script it needs to execute to build the docs. Open the "Run Script" section you just added and put this script into the "Type a script..." box:
This script will generate a docset and log file into your project directory ignoring .m-files and any Pods you have. It will also document classes/methods etc without documentation. But most importantly it's async, so it won't slow down your compilation time and checks if Appledoc is installed so your colleagues won't get build errors.
Adding the docs to Dash
When you build your project you will see a docset file popping up. Just clicking it will add it to Dash (or XCode). Dash will remember where the file is so when it updates Dash will use the latest version when you alt-click or search for something.
Closing thoughts
I would advise not to commit the docs into your version control system, but ignore it. This will prevent conflicts and the docs will regenerate on build so it's easy to get up to date docs.
Also I really think its way more rewarding to write documented classes, enums and methods now since people will actually use them!
0 notes
mathijskadijk · 10 years
Text
Geheime diensten die alles opslaan en monitoren
This blog is in Dutch, it's about the privacy/NSA discussion. Try Google Translate if you're not familiar with Dutch and want to read it. :)
Ja, natuurlijk heeft de NSA niet 6 miljard mensen actief onder toezicht om te kijken of ze wat fout doen, maar het probleem is dat iets wat jij nu doet wel opgeslagen wordt door de geheime diensten. Zo hebben ze een bak met data klaarliggen, mocht je later verdacht worden van iets of bijvoorbeeld minister worden en wil die geheime dienst van je af, dan kunnen ze die data erbij pakken. Hoe meer data de geheime dienst heeft hoe meer slagkracht ze hebben om je in diskrediet te brengen. Ineens is het feit dat je nu privé dingen hebt opgezocht die niet stroken met wat je later publiek zegt tegen je te gebruiken. Of het feit dat je contact hebt met nu een goede vriend, die later in zijn leven een misdaad pleegt kan iets zijn wat goed getimed weer naar buiten komt als het jou niet uitkomt. Dan hebben we het nog niet gehad over dat die data ook verkeerd gekoppeld kan worden en er "bewijs" ligt van dingen die niet kloppen, omdat bijvoorbeeld iemand ergens jou naam heeft gebruikt of je PC is gehackt. Die verkeerde data kan je ook weer om de oren geslagen worden later in je leven als je wel interessant bent geworden voor een geheime dienst. Het nieuwsbericht 'NSA wilde bezoek pornosites tegen doelwitten misbruiken' toont bijvoorbeeld aan dat de NSA actief over dit soort dingen nadenkt, eerdere berichten hebben al aangegeven dat de NSA alle data wil verzamelen die ze kan verzamelen. Het is dus belangrijk om er goed over na te denken hoe ver de geheime diensten mogen gaan en in hoeverre we ons willen beschermen tegen buitenlandse diensten die ons afluisteren. Het afdoen met "Wat maakt mij het nou uit dat ze me afluisteren" of "Geloof je nou echt zelf dat ze alles wat jij zegt of smst checken?". Het mag nu toch wel duidelijk zijn dat als het technisch kan ze dat zouden willen doen. De vraag is in hoeverre de veiligheid en bescherming van jou als persoon opweegt tegen de veiligheid en bescherming van de maatschappij. Is het erg als er af en toe een misdadiger tussendoor glipt die iemands leven verwoest? Ja natuurlijk. En is het erg als af en toe iemands leven wordt verwoest doordat hij onterecht wordt beschuldigd van iets? Ja natuurlijk, misschien nog wel droeviger. Kortom we moeten een balans vinden, zodat we mensen die kwaad willen pakken en mensen die goed willen daar niet de dupe van kunnen worden. Laten we daar eerlijk en open over discussiëren en niet direct elkaar (en jezelf) belachelijk te maken door met "en de terroristen komen!" of "de 3e wereldoorlog komt eraan!" aan te komen.
Origineel geplaatst als reactie op Tweakers.net, ik vond het een blogpost waard.
0 notes
mathijskadijk · 10 years
Text
AFNetworking 2 and batching requests
Even while I'm currently very busy, I try to rewrite Pigment for iOS 7. (I know it really needs an update with the new flat look and feel.)
During the upgrade from AFNetworking 1 to version 2 I ran into the issue that the new NSURLSession style APIs of AFNetworking are missing a method to batch requests. After some hours of reading everything I could find about NSURLSession and AFNetworking 2 I posted a question on StackOverflow.
One answer linked to an AFNetworking issue on GitHub where Mattt explains why dependencies and batching is hard to do. After fiddling somewhat around I found a solution by using a dispatch_group. So if you want to batch requests and wait for all of them to complete check it out.
I've also created an issue on GitHub asking if and how this could be implemented in AFNetworking. I think it would be great if we can implement this feature into AFNetworking so batching some requests is quite easy again.
Dependencies on requests will still be somewhat harder to do, but they should also be possible with this solution. So maybe we even will be able to do something like that in the future.
0 notes
mathijskadijk · 11 years
Text
I rewrote it six times - Wim Anker
Last friday I watched "College Tour" with one of the best and most famous lawyer in the Netherlands, Wim Anker. It was a rebroadcast and I had already seen the interview, but again I could feel his passion about the job and see that he's working from strong principles.
Rewriting his plea six times so it's exactly as it should be, visiting his clients every week and refusing to say anything bad about people that speak badly about him every the time they can. Very inspiring to watch!
Remembers me that we all should work based on our principles, should not judge people and should not be afraid to rewrite over and over again, until it's perfect.
0 notes
mathijskadijk · 11 years
Text
Sifter with the Ziften extension - Happy & efficient issue tracking, finally
tl;dr Feeling that you're bugtracker can do better? Try Sifter it's amazing, also install Zifter for hotkeys and other improvements when using Sifter.
Sifter; our issue-tracker for some time now
At Wrep we use Sifter as our issue-tracker for over a year now. Before Sifter we have used Mantis, tried Fogbugz and looked at some other alternatives, but we're very pleased with our current choice. Sifter is a very lightweight, no nonsense, hosted tracker. It doesn't have workflows, timetracking, custom statuses and other features that sound nice, but you never really use as a small team of passionate developers.
It made us report all bugs into a system again, because I can report an issue within a minute. In Mantis there where so much fields it often felt like too much work to put the issue into the system. That had bad consequences since these fixes weren't always tested and we started to forget issues that should be fixed. Cutting away all the features we didn't use helped us to get in control again.
Making Sifter even better
So Sifter is great, the support from Garrett (the founder) is awesome, but still there where small things that I felt could be improved. That's why I started to create Ziften, a browser extension for Safari and Chrome to make Sifter even better.
Ziften creates keyboard shortcuts, adds project jumping from the searchbox and other tweaks. This makes searching and reporting issues even faster. I don't have to scroll up for menubuttons or go through long project lists to switch projects.
I think it's really important to have great tools like Sifter as a developer, it enables you to focus on your work and minimize the amount of time thinking about what to do next. Optimizing these tools to make them even more efficient is great.
So, now go and try Sifter with the Ziften browser extension for issue-tracking on steroids!
1 note · View note
mathijskadijk · 11 years
Text
Every day is a GitHub day
In the last week of January I decided to work some more on Open Source Software and sideprojects. Writing some code without the pressure of a deadline and working on a project I really like was something I wanted to do more often. So I came up with a daily goal for myself.
I set a goal to do something on GitHub every day. Doesn't have to be much, reporting an issue, participating in a discussion or fixing a small bug is good enough. The do something everyday is helping me to keep some momentum and is easy to do as there is always something small to do, like writing a better Readme or closing some old bugs.
Now, about 2 months later, I see myself coding a lot more on my own sideprojects. It's very motivating and fun to do, doing something small everyday really makes sure you don't lose motivation on a project. Starting with something small helps me to get into the project, sometimes after a small fix I really want to do something more and write a new feature. The other times just looking through the bugs for something small helps me remember there are a lot more cool things to code, so when I've more time I'll don't forget to come back and code more.
I noticed that the most fun comes from new stuff where I have to dive into some docs to get it done, this helps me understand new concepts and makes me learn new stuff that also comes in handy with day to day work.
So after doing this for some time I would say, try to make every day a GitHub day! It's fun, makes you an even better programmer and doesn't have to take much time.
0 notes
mathijskadijk · 11 years
Text
Notificare - Send pushnotifications from PHP
tl;dr: Want to send push notifications from PHP? You should really try Notificato!
Why we build it
We're working on PasPas these days and needed to send push notifications to Apple iOS devices to let them know they should update installed Passbook Passes. This made us looking for a decent push notification library that integrated nicely into Symfony2.
There are some bundles out there that we could have used, but we had some important requirements that none of the current bundles could satisfy:
Take care of the horrible PHP socket implementation that will only notice a disconnect/readable data after sending a few more messages or when waiting quite some time.
Excellent error handling, we need to see what is going wrong and why fast. Something wrong with the cert? Let me know, don't just refuse to connect.
Tested and a nice object oriented structure so it's easy to integrate into Symfony2 without hacking.
What we've created
After searching around we decided to build Notificato and (try to) make it the best push library around. We started out with a nice OO structure that made it easy to unit test all aspects of the library. Easy to understand for programmers.
Then we tackled the PHP quirks regarding sockets. Would I recommend implementing a binary SSL interface in PHP? No, definitely not. Apple disconnects and sends some error information to you on error, but PHP only discovers that the connection was disconnected and there is data available after some time. So we had to jump through some hoops to make sure messages are never ever lost and the error response is always read correctly. Took an evening or 2 to get it 100% right, but here we are.
After implementing push and the Apple Feedback service we looked at the library and saw that all the different classes made it quite hard to get started. Dealing with like 5 classes to send one messages feels like a hassle.
So we created to "Notificato"-class to wrap around the whole class structure and provide you with a nice simple interface. You can digg deeper and use the underlaying classes if you want more control, but to just send messages Notificato is really really easy to use.
Then what are the features that set Notificato apart? Well:
Environment detection, we look at the certificate and tell what APNS environment to connect to
Certificate validation, when the certificate expired, is corrupted or the passphrase is incorrect we tell you. No more vague "connection failed" errors, unless connecting really failed because of the network of course.
Persistent connections, if you queue messages, send them, queue some more, send them again we will keep the connection to Apple open and only (re)connect when necessary for maximum performance. (And to keep Tim Cook happy.)
The tests have 80%+ code coverage at the moment so we don't hope, but know it is working.
Reading the feedback service is even easier then sending a message, no more excuses to not read out the feedback service!
The future of Notificato
And what is there to expect in the future? Well I don't really know, it's all development in our spare time from here. So nothing to promise, but feel free to help! :)
But if I take a look into the future I guess we'll want to add some sort of Android GCM support. We need that ourselves and it would be nice if we also can rely on Notificato for pushing to Android.
Also the possibility to send one message to multiple devices is on the list, but a loop also works just fine for the time being. So that won't be high priority.
I hope you'll give Notificato a try and let us know what you think. Report any ideas and/or features you'd like, together we can make it even better! Happy push messaging!
0 notes
mathijskadijk · 12 years
Note
Hi Mathijs, I was having the same issue as you with the 14 day view not looking great in Mountain Lion. Also, I switched back to the 7 day view in the regular preferences pane. The problem I have now is that this preference does not seem to persist - whenever I restart iCal it reverts to the 14 day view. Are you seeing the same behaviour? Have you found a solution for this? Thanks, Steven
I'm seeing the same behaviour of not persisting the 7 day view. However, someone on StackExchange seems to have a better solution that seems to persist and will solve this problem! :)
Executing this "defaults write" command on the terminal solved my problem as far as I can see:
defaults write com.apple.iCal CalUIDebugDefaultDaysInWeekView 7
Hope this helps!
0 notes
mathijskadijk · 12 years
Text
Disable two week view in the Mountain Lion Calendar App
Update: It seems that this solution will not persist. See my answer to a question why the solution in this post will not persists for a better working solution!
On OS X Lion I enabled the "super sekret iCal debug menu" and set my iCal to a 14-day weekview. Quite nice experiment and I liked it, but when I upgraded to Mountain Lion the Calendar app still showed 14-days in a week and Calender every once in a while freaked out.
Especially when scrolling Calendar scrolled sometimes two weeks, sometimes one and once in a while even in the opposite way. Not good!
Enabling the debug menu under Mountain Lion is not possible, so I've been looking around for a way to disable the 14-day weekview for a while. Posted on StackExchange, but nobody seemed to know how to disable this thing.
Now, finally, I've discovered how to solve this problem and get back a 7-day weekview! It's pretty easy actually:
Just go to Calendar > Preferences... and change the value of days in a week to another value. This will make Calendar reset the number of days in a week! It will instantly fix your weekview, not even a restart needed. Isn't that great. :)
0 notes
mathijskadijk · 12 years
Note
Thanks for your work! You really make my day. Ever since I upgraded to Mountain Lion I have been dreaming for a Battery app that display remaining time. :)
Thanks for the kind words! Also lots of credits for Han Lin Yap, creator of the project who also invested lots of his time in this project.
0 notes
mathijskadijk · 12 years
Note
Hey I saw your battery time application, but I don't know how to install it!
Well it's actually quite easy to install the Battery Time Remaining App. The easiest way is go to this download page on GitHub and download the most recent version of the App. Then unzip the file by double clicking it, optionally move the unzipped App to your Applications folder, launch the App and enjoy! 
0 notes
mathijskadijk · 12 years
Note
Over die ML Batterij app, is het mogelijk om die te verschuiven op de statusbar? Heb elke toetscombinatie geprobeerd + google gezocht, maar kreeg 'm niet verschoven.
Dat is inderdaad een beetje naar, maar dat kan niet. OS X voegt de Apps toe in volgorde van opstarten en je kan alleen Apple's eigen Apps verslepen. Ik heb er zelf mee leren leven, maar het is inderdaad jammer! ;)
0 notes
mathijskadijk · 12 years
Text
Mountain Lion how to show battery time remaining
Summary: To get the battery time remaining back in you're menubar install and use this app. Then disable Apples battery state App if you don't want to have 2 battery icons and you're done!
Another "feature" of OS X 10.8 Mountain Lion is that you won't be able to see the battery time remaining in your menubar. You have to click the battery icon to show the time. Since I find this quite annoying I decided to take some actions.
First I've submitted a bugreport to Apples Bug Reporter, I hope enough people will do that to catch the attention of some developers. That way we should be able to get this little feature back.
After searching the web I found an small App written by Han Lin Yap on GitHub. It was a bit rough but does show the remaining battery time. I decided to fork it and tweak around. First only to get rid of some Ω and <> signs, but starting to code I wanted to go somewhat further.
So what did I add?
Start on login functionality
Battery icon
Time remaining when charging the battery
Textual improvements (less special chars)
Some small code improvements
I think that there will be a lot more people looking for a small tool to show the battery time remaining in the menubar these days. So until Apple has restored this functionality you can download the App initiated by Han Lin Yap and extended by me.
Please feel free to contribute and/or add issues and feature requests on GitHub! Or just get in touch through Tumblr over here. :)
1 note · View note