First world problems

Have you ever thought you might be liking too much stuff on Facebook? Have you ever thought that it might be such an important issue that you need to stop doing it? And write about it on a popular tech website?

Well, some people have, as written in this article. Seriously, if people do not have a real problem to cope with they will find one. If we have a job, a home, and a decent life let us complain about how we must do stuff that did not even exist a few years ago.

Lend Kendall:

I’ve hit the “like” button thousands of times out of obligation, for worry that I might hurt someone’s feelings or make them feel ignored.

Really? What kind of obligation do you have to random people on the Internet? Luckily Facebook does not have (yet) a feature showing you who read your posts like they have for chat.

Quickfix for pogdesign checkboxes

I got finally fed up with the Unity-like checkboxes on my favourite TV-show tracking site. Quick roundup: these checkboxes are represented by a box with a grey checkmark when unchecked and a box with green checkmark when checked.

Not only is this horrible for colorblind people, it also drives sane persons nuts.

If you use Stylish extension for firefox, or some alternative for your browser then you can use this snippet to replace them with standard controls:

@namespace url(http://www.w3.org/1999/xhtml);

@-moz-document url-prefix("http://www.pogdesign.co.uk/cat") {

 .lists div label, .day .ep label, .today .ep label  {
   /* bright background */
   background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAAsCAYAAACzBUKoAAABJElEQVQ4je2TscqDQBCEZyWPFiFgYymWKXyGvEEsfISAvdilFCEEJEXeIU0KO0vhlttcqpOY8POvRboMHNcMyzAfQ6fTyQVBAP+IaPqJCDM1TeOg0PV6dYExRuOFiCBgZpXZWgv1ZWZeaNbGWGQ2xiw0W2vVMWi/3ztP65XeK1X/VuM4Qo17t9upcOd5/j/uLMscoMC93W7d4/EA8IY7iqJZnDRNnbUWIjK1MZmNMdhsNg4A4jh2zAxmRlmW5M0rH4OZISIIw9AZYyAiqOt6qmOG+3w+k7/GzDgej7PePnB3XUfMjLZt3wr+A/flcvkw+hi0Xq/VuOl+v+vXfbvdVLiHYfite9KX111VlX7dfd/r110UhQr34XD4rXvSl9edJIka9xPBTXfNN90QEQAAAABJRU5ErkJggg==') !important;

   /* dark background */
   /* background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAAsCAYAAACzBUKoAAABJ0lEQVQ4je2TsY2FMBAF1+g6oAJSEpqgCEqhAwgogQpogYScyBkRBA6IIETyCuMfLQLj01+Cy86ShVYeW0+Mnui6zgZBALSFEOdXCAG31batBcbq+94GWmsOC8YYCBCRBe/7DuyXEfElzI3xCtZav4T3fWfHEEVRWLJ1tXe1Svtn2zZg687znKW7LMvvupdlsQAM3QQCOLqvB775oZuAKxiGoThhN4YPfMDXA9/80E2AC56wq9sHUgyRpilbt1BK8ds9jiNL97qu/+0+1x+3u2kafrvneea3u6oqlu66rr/rVkrx2j1Nkz2OAwAc3VLKW5xhGKwxBgh+6KYLUkqLiICIEEXR7+2mC9ZaiOPY3+4kSW7/yZ0fuglwwRN2dftAiiGyLGPr/gDD7TWBmCHgngAAAABJRU5ErkJggg==') !important; */

 }
}

If you use a dark background then un-comment the second background-image tag.

Enjoy

Redesigns for the worse

With the iPhone 5S release approaching feature wish lists and redesigns of iOS7 are legion on the Interwebz. Undoubtedly many people find that iOS in its current state lacks features, looks old and boring, and more generally “has to catch up with the competition”.

Usually the argument goes in the lines of “the home screen is just a list of icons” or “Apple must put widgets on the screen” or even “iPhone should centered around people, not apps”. Many proposed changes poke around the lock screen, many of them add a lot of eye candy, most of them are just wishful thinking.

It seems that lot of designers want to be part of the apple experience, want to show their skill by “improving” the user experience of an applauded product. The problem is that they base their designs on opinions of a minority (albeit very vocal) of geeks and tech enthusiasts. They criticize Apple’s design decisions without looking at the reason behind them.

Let us look at some examples and see what’s wrong with them:

Case: the iOS7 redesign video

A few days ago Federico Bianco has published a video of his ideas of how iOS 7 should look like. General reception, if we take comments on forums such as Mac Rumors, was positive. But it these comments were several very good remarks.

Lock screen

The first thing that comes in mind after seeing all of those lock screen features is security. Judging from several security holes that have surfaced in the past months it is apparent that the less features the lock screen has, the better. In its current state it can display time, notifications (that you have chosen to appear there), let you call emergency numbers and take a picture. For any other action you need to type in your passcode. Now, of course not all people use the passcode protection but most people do and it is a good practice that should not be discouraged.

After the redesign one can reply to texts, call arbitrary numbers, switch off wifi and my personal favorite: put the phone into airplane mode. What a joy when some random bloke can cut your phone off as a prank whenever you leave your phone out of sight for a minute. Apple has put a lot of effort so that without passcode people can not access even your photos and this dude lets everybody happily use your call minutes.

Widgets

The widgets Mr. Bianco proposes are a nice touch, in theory the allow you to peek at some of the information the application provides and in some cases take some rudimentary action. In practice the implementation is quite poor.

One very important thing to consider when using the double tap/click is the action that happens when the user is too slow. For example if we consider the selection on iOS then if the double tap is too slow one would move the cursor with the first tap and open the selection menu with the second. Once there one can select the word with a single additional tap.

In the case of double tap opening widgets, a wrong gesture would open the app. No big problem as you can get the information from inside the app as well as from the widget, as long as it does not take too long to open which would be a major frustration. Instead of earning half a second you would lose two.

The one thing I do not get with all these on-screen widgets is their utility. Why would I throw out place for apps to put some random information instead? What is the point of putting them on the main screen when in order to access it you need to close your current app?

Apple does already have a perfect place for widgets, the only missing thing is opening the API. You have guessed it: the notification center. The NC is the best place to put all kinds of widgets for several reasons:

  1. It is already there
  2. It is accessible from everywhere
  3. People are already familiar with it
  4. Jailbreak community has already shown that it works

If Apple would open the API then a lot of people would be happy.

Settings drawer

Another active corner = another hidden feature. There is clearly a huge demand for quicker access to settings. However I would see this more either as a widget (made by Apple, there is not much hope that apps will ever get access to phone settings) or inside the app switcher alongside music controls.

Mission control

Task switching was remade by a great ton of designers such as here in this video. Some of them are already available for the jailbreak community, like the much appraised Auxo.

The common point of all of this switchers are snapshots or live previews of the applications. In the case of Auxo they are completely useless as they are hardly twice as big as the app icon. The icon itself is shrunk. It is beyond me how somebody thinks this is a good idea. A snapshot preview consumes considerably more memory than an icon and it is much harder to quickly recognize.

As for live previews, they bring up the problem of real multitasking. Although background running apps could, in theory, provide a live preview, for most of them that would be impossible. Simply because the background process is not the same and the renderer for the application does not run and should not run because of performance issues.

The shelf

This is the best idea in the video in my opinion. The major issue I have with it is the fact that it sits on your dashboard as a folder. The news stand like shelf can only show 3 files on the iPhone at the same time, which is really not enough if you consider the quantity of the files that would end up there.

I really like the idea of system-wide file repository, as long as it is organized by type and searchable and not in a folder-like structure.

Case closed

Well, my rant is finished. It was largely based on comments and articles I read previously such as the piece on Unsolicited redesigns. Of course redesigning something is a boatload of fun, however it would be nice if people first asked themselves “why” has the original author done it one way or another before trying to improve on it.

Elegant as Clockwork template for Apple Pages

Pages is a quite nice word processor even though has several quite stupid anti features (such as the page being stuck to the top-left corner). Nevertheless it is currently my tool of choice when I need a document with more than headers, lists and bold text, for which I would of course choose markdown. I have created my own default template, which you can of course download right here. In the zip file you will also find a document explaining all of the features of this template. You can see how it compares to the default style on this image:

1

Download the zip package containing the theme here:

Elegant as Clockwork v1

To install it, put it into ~/Library/Application Support/iWork/Pages/Templates/My Templates

Lock screen on Mac OS X with keyboard shortcut [updated]

Last update: 2017-11-18 for High Sierra

Luckily we now have a real shortcut without hacks using ⌃⌘Q

One of the issues that rises the most eyebrows while using Mac OS X is that there is no native way of simply locking your screen with a keyboard shortcut. Finally I have managed to compile all of the stuff on the Internet to come up with a simple yet real solution to this problem If you can not be bothered by reading the whole article here is the short version:

  1. Run Keychain Access go to Preferences → General → Show keychain status in menubar.
  2. Look at this tutorial.
  3. Use the script from freespace’s github page instead of my example.

And now for the long version.

Introduction

There are a lot of ways to work around this problem and many of them were already published on a zillion of blogs. In practice four methods prevail:

  1. Setting the system to lock immediately upon launching the screensaver and then using the ctrl+⇧+⏏ (control+shift+eject) shortcut.
  2. Enabling the Keychain Access menu item and then choosing lock screen from the menu (by mouse).
  3. Enabling the multiple user login and then switching user.
  4. Using a third party software, such as Quicksilver or Alfred.

Of course these methods have all some benefits and some drawbacks. When we look at them we can easily spot that only the option two actually does what we want: it locks the screen without closing the session, it is native and it has to be invoked by the user. However it does not use the feedback, so fails to satisfy the primary objective.

The real solution

It is extremely simple to assign a keyboard shortcut to any item in the application menu. Sadly, the task bar is not considered part of it and the keyboard shortcuts will not reach it. Enter AppleScript and Automator, solution to any problem there is! It took some digging but there actually is an AppleScript which clicks on menu items. With that we can create a service that will then be available thorough a global shortcut.

Preliminary

In order for this to work you need to enable the Keychain Access menu item. Run Keychain Access go to Preferences → General → Show keychain status in menubar,

Implementation

The path from a script to a service to a keyboard shortcut is already paved. I have already covered how to assign a global keyboard shortcut to a script so please refer to that.

The script

The actual script to use is taken from freespace’s github page and is actually based on an example provided by Apple itself. For the sake of consistency, here is the script:

tell application "System Events"
    get properties
    get every process
    if UI elements enabled then
        tell process "SystemUIServer"
            repeat with i from 1 to number of menu bar items of menu bar 1
                if description of menu bar item i of menu bar 1 is "Keychain menu extra" then
                    tell menu bar item i of menu bar 1
                        click
                        if name of menu item 1 of front menu is "Lock Screen" then
                            click menu item "Lock Screen" of front menu
                            exit repeat
                        end if
                    end tell
                end if
            end repeat
        end tell
    else
        tell application "System Preferences"
            activate
            set current pane to pane "com.apple.preference.universalaccess"
            display dialog "UI element scripting is not enabled. Check \"Enable access for assistive devices\""
        end tell
    end if
end tell

And for the sake of clarity: I did not code this script.

Fried noodles with pork

More food from my production. Tested, eaten and tasty. This food does not require much ingredients and should be pretty quick to prepare (if you are good at multitasking then about 20 minutes)

Ingredients

As always, we will have to do some shopping before cooking anything. Depending on what you already have you can get this for about 6€ for two doses. So go and get these:

ingredients

  1. Some mushrooms
  2. Some shiitake mushrooms
  3. A piece of leek
  4. Half a carrot
  5. Half an onion
  6. Several slices of garlic
  7. Soy sauce
  8. Cornstarch
  9. Salt
  10. Black pepper
  11. Chinese noodles
  12. Pork (can be some other meat)

Preparation of ingredients

Before cooking comes washing and cutting

  • Wash the mushrooms and cut them into quarters or similar
  • Cut the shiitake mushrooms into slices (wash them too)
  • Cut the leek and carrots into long thin bars
  • Cut the onion into dices
  • Crush one piece of garlic and cut the rest into small pieces
  • Cut the meat into french-fries like pieces (salt it)
    • Dip the meat in soy sauce and wrap it in cornstarch

sliced-ingredients dipped-meat

Cooking

First stage

First we will cook the mushrooms. Put the crushed piece of garlic into salted water (not much just enough to have the mushrooms covered) and make it boil. Then add mushrooms (both) and cook for about three minutes.

cooking-mushrooms

At the same time put some oil onto a frying pan, heat it and add sliced garlic. When it turns brownish add the meat and fry it for a while. Add pepper. When the crust from cornstarch appears add mushrooms and some water (use the mushroomy water). After a while add carrots and leek. Cook for several minutes stirring all the time. Add some more water from mushrooms from time to time. At the same time (this is when multitasking comes handy) make the noodles (for cooking method refer to the package)

Second stage

Put some oil into a wok and add onions. Put noodles into the wok add soy sauce and fry them for a while (mix them well). After a while add the meat and some more water. Cook for several minutes.

cooking-meat-1 cooking-meat-2 cooking-meat-3

Final stage

Eat.

Suggestion of presentation:

final-product

Putting old stuff back in

I have decided to re-publish the old articles from my old Chyrp blog here. I have not got to it before as I was too lazy. Not that anybody cares but at least it will look like there is something here.

Smelly spread

Why smelly? Because your breath after eating this will be comparable to that of a thousand years old dragon. But it is well worth it. The recipe is dead simple as well.

Ingredients

ingredients

  1. Sardines in oil (any oil as long as it is not motor oil)
  2. Butter
  3. Onions

Preparation

Simple as promised: Just put the fish into a bowl, add a few slices of butter and the diced onions. Then furiously mix the thing until it vaguely looks like something spreadable on a bread. Job’s done!

preparation-1 preparation-2

And yet …

Making the spread is simple, the difficult part is to serve it right and arrange the plate so it will have some bling to it. I did not try this time, but somedays I’ll update this with some better presentation.

finished

Shanghai Heat

More noodles! Why ?, you might ask, well because everyone loves noodles. And mushrooms, we will be seeing lots of those in just a few moments. So, put on your white hat and start making a list of things to buy.

Ingredients

OK, be prepared to raid the nearest Asian shop because this meal needs several special ingredients. As always, here’s a picture of what we’ll need :

img-ingredients

  1. Chicken escalopes
  2. Mushrooms - Agaricus
  3. Shiitake mushrooms
  4. More shrooms - Pleurotus
  5. Auricularia auricula-judae or “black curly Chinese mushrooms” (I actually mix two kinds of them)
  6. Green and red bell pepper
  7. Chilly pepper, also both red and green
  8. Onions
  9. Garlic
  10. Butter (salted butter for the win)
  11. Corn starch
  12. Black pepper
  13. Spices - coriander, caraway, cumin, cinnamon, paprika …
  14. Salt
  15. Soy sauce
  16. Shanghai noodles
  17. Green-tea soba noodles

Preparation

Got everything? Good! Preparation of the ingredients is pretty simple and shouldn’t take more than twenty minutes.

  • Clean the chicken and slice it to small pieces. Add the spice mix and cover it in a thin layer of corn starch. I usually just put a soup spoonful of it on it and mix it with hands.
  • Wash the mushrooms and slice them.
  • If the black mushrooms are too huge, crush them before washing them.
  • Wash, clean and cut the bell peppers into cubes.
  • Wash the chilly peppers and cut them into roundels.
  • Cut the onion into halves. Dice one of the halves and cut the other to several smaller parts.
  • Crush one piece of garlic and dice the rest.

img-meat

Cooking

Everything’s done ? Excellent, now we can start doing some cooking.

Shrooms

Pour some water into a bucket … err a cooking pot. Not too much of it though. Just enough that when you put all the mushrooms into it it will cover them all. Don’t put them in it just yet though. Put some butter and one crushed clove of garlic in there first, don’t forget to add salt. Let it boil and put all the mushrooms inside afterwards. Wait for about 2 minutes.

img-shrooms

Vegetables

Once the mushrooms are half cooked pour more water into the pot and add all the vegetables - bell pepper, chilly and half of the onion (the one cut into bigger cubes). Add some black pepper as well. Cook until it’s cooked (duh).

img-vegetables

Meat

Once the vegetables are cooking, you can begin to prepare the meat. Put the diced garlic and onions onto a frying pan with a bit of oil. Make them fry for a while and then put the meat into the pan and add some soy sauce.

After a few minutes, when the meat is fried, add the contents of the cooking pot into the wok. Do keep at least a half of the water in the pot, we will use that later. Lower down the heat under the wok.

img-frying img-combining img-combining2

Noodles

We will be using a mix of Shanghai noodles and green-tea flavoured noodles, but any noodles will go. Add more water to the cooking pot, let it boil again and cook the noodles inside (refer yourself to the package, cooking time may (and will) vary). Once the noodles are cooked, you are ready to serve.

img-noodles

Final word

Finally a meal that not only tastes, but also looks good. When making this one, don’t hesitate to experiment. Personally I like to add some baby-corn, bamboo and especially some chilly sauce

img-finished

Add shortcuts for emoji characters to finally put the ± key to use

I have finally managed to find a use for the ± key on the Apple keyboard. This keyI have finally managed to find a use for the ± key on the Apple keyboard. This key bugged me since I got the computer as I have never ever seen it in a text and just can not understand why it would be on a keyboard in the first place.

Since there is a native text-expansion feature in OS X (Settings → Language & Text → Text) it seems that this character could serve as a perfect “marker” for some exotic shortcuts. The color emoticons available in the OS X make a perfect candidate since inserting them into text is quite a hassle as one has to go through the Special Character menu.

Thus I made shortcuts for some of them as illustrated here:

img-emoji-shortcuts

They help me navigate in plain text document and provide valuable highlighting options in places where other methods do not exist. Maybe this could help you too. Bugged me since I got the computer as I have never ever seen it in a text and just can not understand why it would be on a keyboard in the first place.