makefile – all you wanted to know about variable but were afraid to ask

Sometimes, all you need is a simple solution for checking whether variable you really (really!) need is already defined.

Stolen from: http://gmsl.sourceforge.net and found here The GNU Make Book

makefile – know your location

If you want to know where you really are during Make

Source: unknown Stack Overflow user

Scratch Programming Playground by Al Sweigart

image

Summary: Great introduction to Scratch

So, you probably wonder where to start your adventure with Scratch. Don’t look any further. You have just found what you were looking for.

Let me be straight here. This book is perfect read after finishing Super Scratch Programming Adventure! (published by No Starch Press). Supper Scratch Programming Adventure will provide you with very basics of Scratch, while here, you can elevate your knowledge and become more experienced and more sophisticated Scratch coder. You don’t have to be a nerd to start your adventure with games. In fact, author tries to convince you that your math related issues – I know some people have them – are really not that important. And I fully agree here.

flow2
Click image to enlarge

What I like about the book is the way it delivers the knowledge – through building games. Number of them. It encourages people to learn by practice and experiments. It will push you towards code development instead of making you remember the stuff. That’s something I really appreciate. That’s quite in the line with my approach to learning:

For the things we have to learn
before we can do them,
we learn by doing them.
– Aristotle

You are supposed to build games by actually developing them. What I find quite useful for the readers are steps taken while building each project:

      at first you take a look at sketch of your game. You can always do yours, all you need is sheet of paper and pencil
      then, you learn how to code each of the elements used in the game
      finally, you are encouraged to alter initial concept by introducing some changes into play (e.g. turn one player game into two player game, or to introduce some cheat codes)

This approach gives you the feeling of controlling everything. You are not thrown into deep water, instead, you make small steps to achieve the goal specified in each chapter.

But don’t be fooled by simple language and quite likable creatures hanging all over the place. They will teach you some good programming practices. You will be able to apply what you have learned, later during your engineering carer :) One of these principles is called DRY (Don’t Repeat Yourself, DRY at Wikipedia).


flow

Click image to enlarge

What’s also important is that you can get immediate access to content of the book, you can play sample projects (they are available via scratch.mit.edu – Projects). This way, you can compare your work to what can be treaded as reference. Really useful. Especially for people who just start their experience with coding. And to make this review more appealing to people whose motto is – “seeing is believing” – take a look below. That’s what you will learn to code! Cool, isn’t it?

snake

If you have used Scratch before, you will be able to find (inside the project) the good old Scratch code. It consists of blocks that make it super simple to code.

snake_code

If you haven’t used Scratch before, don’t be afraid. It’s really, really simple. Just take a look here:

So, just to make a quick conclusion. If you like games, if you want to write games, if you want to learn how to code, grab this one and make sure to read it cover to cover and build all the projects you find there! And don’t cheat! Try to code everything by yourself. This way, you will get most of it.

NoStarch (print): Scratch Programming Playground
NoStarch (e-book): Scratch Programming Playground
Safari Books Online: Scratch Programming Playground

Two line prompt with colors and gadgets

To get this

shell

use this

mwm confing for people who like minimalism during remote work

Here comes my supper ascetic ~/.mwmrc I use on regular basis.

and ~/.Xresources as well

Makefile that calls itself without hardcoding file name

If you have to call makefile multiple times. And you don’t want to hardcode file name you can make it following way:

Remember that targets are indented with tabs :)

Then, just call it following way:

or, if you put the file inside makefile, just call it like this

History repeats itself – or, applying law of series to Computer Science ;)

Some time ago I had this, quite bad, experience of upgrading OS X. It ended with horrible disaster. I have lost all my data from my HD. As I am super paranoid about data and backups, loosing all my data was not a big deal. I always have my daily backup running (external HD), I have also NAS running all the time. So, generally speaking, first experience was close to:

Nagle padł twardy dysk
Zamazał swą treść
Nie ma zdjęć

Few hours later, after getting all the data from backups, I was at place before the crash minus Gigabytes of all unnecessary data :) BTW – I am still waiting for my download link from 65daysofstatic ;) I don’t have a backup of few mp3 from these guys.

Few months later I have decided to upgrade OS X once again. And, guess what ;)

Yes, that’s right. It happened again! I have lost all the data again during system upgrade. It sounds like some bad luck. However, again, my daily backups plus NAS saved my day.

Now, there is another disaster coming into party :) My NAS is based on FreeBSD. I have decided to upgrade it as well. I remember issues while trying to upgrade it too many releases at one go. I have faced few issues while jumping from 8 or 9 to 10.2. So, I have said to myself.

– No, not this time. This time I will be supper safe and I will do upgrades as soon as new major release is ready.

I think you already suspect what’s coming :)

Yes, I have upgraded my NAS by upgrading FreeBSD and I have lost it for some time. It turned out that FreeBSD made some merges of /etc/devd.conf and I was not able to start my backup machine at all.

So, just to conclude. All systems are really fragile. And, an advice. Do not ignore messages regarding merging config files. Double check whether they are merged correctly :)

My NAS, TimeMachine and yet another backup are running now fine. They are patiently waiting for another disaster :)

IntelliJ – Scala Worksheet and missing symbols issue

In case your Worksheet can not find symbols from classes/traits/objects in your project you can use very simple solution to fix that.

If you see message – “not found: value …” or similar, just make sure to “Make project” while running Worksheet.

IntelliJ_MakeProject

Scala – the “successor” of C

Path Finder 7 – Norton Commander like layout

If you are using Path Finder 7 make sure to press Command + J (⌘ + J) and then set following settings (pay attention to “All windows” at the top).

pathfinder