[14-03-2016]

Learn to Program with Scratch by Majed Marji

Summary: Really good reference for Scratch I have started my Scratch experience with Super Scratch Programming Adventure! book and my first reaction to reading Learn to Program with Scratch was like I wanted to reject this one and not to read it at all. The point here is that Super Scratch is made with better […]



The trampoline code is quite simple – all it has to do is to react on mouse position change.

trampoline

Button is responsible for triggering all the sprites on the scene when it is pressed (it uses messages to achieve that).

button

And the key “player” here is the ball. It is responsible for flying around and determining whether it should bounce or stop the game (when you fail to catch it with trampoline).

ball

The organization of the book is similar to any other programming language manual. You can find here sections describing all the elements of the language, with samples and explanation of how to use them. You can find lots of tutorials, however, they might be hard to follow sometimes. There is also a quite comprehensive index to make your life easier when you are looking for some particular stuff.

In my opinion, this one is best fit for you if you are either a teacher or you are at high school/middle school. But for sure, I’d advice to buy it if you want to get gentle introduction to Scratch.

Product page:

O’Reilly (print): Learn to Program with Scratch
O’Reilly (e-book): Learn to Program with Scratch
Safari Books Online: Learn to Program with Scratch

-->
[11-03-2016]

Scratch w szkole – Zadanie 002 – rozwiazanie

Jeżeli jeszcze nie wiesz jak rozwiązać Zadanie 002 rzuć okiem tutaj Jeżeli masz problemy z wielkością bloczków, przełącz się na tryb wyświetlania w youtube (watch in youtube). Jeżeli chcesz rzucić okiem na projekt w którym Scratch kręci się raz w lewo, raz w prawo, pobierz ten plik: zadanie_002_obroty.


[10-03-2016]

Scratch w szkole – Zadanie 002

Tym razem, rzucimy okiem na obroty. Duszki (np. kota) można obracać przy pomocy klocków Turn. Wyglądają one tak: Używając tych klocków, można obrócić duszka o dowolny kąt (podawany w stopniach). Poniżej, przykład takich obrotów A teraz czas na zadanie. Poniżej czeka problem do rozwiązania. Postaraj się tak obrócić duszka (kota), żeby całkowicie zasłonił swój cień. […]


[10-03-2016]

Installing ImageMagic on OS X

If you want to use “convert” app (that is bundled with ImageMagic) you should install it. Fortunately, installation is super simple and seamless. mkdir ~/opt cd Downloads curl “http://www.imagemagick.org/download/ImageMagick.tar.gz” -o ImageMagick.tar.gz tar zxf ImageMagick.tar.gz cd ImageMagick-6.9.3-7/ ./configure –prefix=$HOME/opt/ make make install export PATH=$PATH:$HOME/bin convert –version


[09-03-2016]

Converting mp4 to animated GIF

This is something I have found quite helpful while generating animated demos of Scratch movements. Worth to keep it handy. ffmpeg -i input.mp4 -pix_fmt rgb24 output.gif ffmpeg -ss 00:00:00.000 -i input.mp4 -pix_fmt rgb24 -r 10 -s 320×240 -t 00:00:10.000 output.gif convert -layers Optimize output.gif output_optimized.gif Source: How can I get ffmpeg to convert a .mov […]


[09-03-2016]

Raspberry PI 3 – Scratch 1.4

It’s fairly easy to start Scratch 1.4 on Raspberry PI 3. Just run it from the menu. It’s already there.


[08-03-2016]

Raspberry PI 3 – minecraft server

1. Install Raspberrian on the SD card # !! Instructions below are for OS X !! # List all connected disks diskutil list # Note down disk device (in this case it is /dev/disk1) # Make sure to use correct name !! # dd is super brutal and it will overwrite everything # without single […]


[08-03-2016]

Raspberry PI 3 – my SD is 100% full after first startup

If your Raspberry Pi has only ~4gb partition after first startup make sure to resize (expand) the file system. sudo raspi-config


[07-03-2016]

Scratch w szkole – Zadanie 001

To jest pierwsze zadanie. Aby je ukończyć musisz wykonać kilka czynności. Po pierwsze, pobierz projekt ze strony GitHub: Zadanie Nr 001 Otwórz ten plik w Scratchu – pamiętaj aby zainstalować Scratcha. Jeżeli nie wiesz jak to zrobić, rzuć okiem tutaj: Installing Scratch Po otwarciu pliku, powinieneś zobaczyć coś takiego: Twoim zadaniem jest dotarcie Scratchem do […]


[07-03-2016]

Scratch project – Task No.001

This is very simple task and it will require just few steps to finish it. First, download sample project from GitHub: Task No 1 Open this file in Scratch application (remember to install it). You can find steps on how to install Scratch here Installing Scratch After opening project file you should see following scene […]


[07-03-2016]

Error: Permission to user/repo denied to user/other-repo

Just remember to ssh-add all your shh keys for all your github accounts. ssh-add ~/.ssh/id_user2 ssh-add ~/.ssh/id_user You can also try to fix things by git remote rm origin git remote add origin git@github.com-user:user/repo.git git push –set-upstream origin master git config user.name “user” git config user.email “user@domain” git add . git commit -m”” git push […]


[03-03-2016]

Argument parsing in bash

#!/bin/bash ARG3=NO for i in “$@” do case $i in -arg1=*|–argument1=*) ARG1=”${i#*=}” shift # go to next arg=val ;; -arg2=*|–argument2=*) ARG2=”${i#*=}” shift # go to next arg=val ;; –arg3) ARG3=YES shift # skip argument without value ;; *) # unknown option ;; esac done if [ -z “$ARG1” ]; then echo “ARG1 can not be […]


[02-03-2016]

Script that works in bash, zsh and tcsh

test “$?BASH_VERSION” != “0” && test “$?ZSH_VERSION” != “0” || goto tcshcmd foo() { echo “running in bash” } bar() { echo “running in zsh” } if [[ -z “$ZSH_VERSION” ]]; then foo else bar fi exit 0 tcshcmd: echo “running in tcsh” if ( “$1” != “”) then echo “you have passed: $1” endif


[17-02-2016]

Scratch – it’s really super easy

Why do I like Scratch? Because simple things should be simple and that’s exactly how scratch works. Building simple animation is just a matter of putting few sprites, choosing background and composing the code out of few blocks. That’s it. Above animation is a result of building simple code.


[17-02-2016]

Maven copy dependencies into directory

mvn dependency:copy-dependencies -DoutputDirectory=lib


[10-01-2016]

OpenVPN on Mac OS X

If you need OpenVPN on your Mac, and you don’t want to pay for OpenVPN applications, you can compile everything for your own. 1. Get OpenVPN for OS X You can download OpenVPN, for free, from page: https://codeload.github.com/OpenVPN/openvpn/zip/master 2. Get LZO library Download LZO sources from http://www.oberhumer.com/opensource/lzo/download/lzo-2.09.tar.gz 3. Get tuntap for OS X Download installation/sources […]


[07-01-2016]

Building GNU Typist for Mac OS

GNU Typist is a great source for learning touch typing. You can install it on your own at your Mac. Just follow the steps. 1. Get the source of typist # make sure to have all sources inside ~/opt/src mkdir -p ~/opt/src cd ~/opt/src curl -O http://ftp.gnu.org/gnu/gtypist/gtypist-2.9.5.tar.gz tar zxf gtypist-2.9.5.tar.gz 2. Get the source of […]


[12-11-2015]

Nice quote

“At some point, everything’s gonna go south on you and you’re going to say, this is it. This is how I end. Now you can either accept that, or you can get to work. That’s all it is. You just begin. You do the math. You solve one problem and you solve the next one, […]


[30-07-2015]

Script that works for bash and tcsh at the same time

test “$?BASH_VERSION” != “0” || goto tcshcmd echo “running in bash” if [[ “$1” == “test” ]]; then echo “you have passed test as argument” fi return 0 tcshcmd: echo “running in tcsh” if ( “$1” == “test”) then echo “you have passed test as argument” endif


[21-07-2015]

gdb – string comparison in breakpoint

break foo if strcmp(string_var,”some_string”) == 0