Review: „Learning jQuery Deferreds”

cover

Promising Deferreds

Learning jQuery Deferreds is another book related to JavaScript I read from O’Reilly Reader Review Program.

At first I was struggling to grasp the idea how jQuery Deferreds work but explanations provided by author helped me understand this.

I solved some of challenges in Chapter 3. It’s nice that they tackle many different problems in different contexts but I didn’t find them very engaging.

In general it’s good to get familiar with idea of deferreds and this book is good with explaining with that concept.

My rating:

Product page: http://shop.oreilly.com/product/0636920030508.do

I review for the O'Reilly Blogger Review Program

Ruby 2.1.2, Ruby on Rails 4.1.1 — instalacja na Ubuntu 14.04

Na początek instalujemy potrzebne biblioteki i narzędzia do skompilowania Rubiego i gemów domyślnie będących w zależnościach Railsów.

sudo apt-get install build-essential bison openssl libreadline6 libreadline6-dev curl git git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool nodejs

W przypadku korzystania z gemu ‚pg’ warto doinstalować:
sudo apt-get install libpq-dev

Na stronie: https://rvm.io/rvm/install za pomocą polecenia:
curl -L https://get.rvm.io | bash -s stable --ruby
instalujemy RVM (Ruby Version Manager) oraz najnowszą wersję Rubiego.

Następnie do pliku .bashrc w katalogu domowym dodajemy następującą linijkę:

[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*

W terminalu wczytujemy zmieniony .bashrc za pomocą polecenia source ~/.bashrc.

Teraz opcjonalnie możemy stworzyć plik .gemrc w katalogu domowym i dodać następujące linijki:

gem: --no-ri --no-rdoc

Dzięki temu przy instalacji gemów nie będzie generowana dokumentacja.

Poleceniem:
rvm use 2.1.2 --default
wskazujemy, że domyślnie chcemy korzystać z Rubiego 2.1.2.

Zaktualizujmy narzędzie gem do najnowszej wersji:
gem update --system

Warto zainstalować jeszcze Bundlera:
gem install bundler

Do zainstalowania pozostały jeszcze Railsy, co robimy poleceniem:
gem install rails

Po instalacji tworzymy testowy projekt, aby sprawdzić poprawność działania.
rails new projekt
cd projekt
rails server

Wchodzimy na stronę: http://localhost:3000, aby zobaczyć działającą aplikację.

Review: „JavaScript: The Good Parts”

cover

Learn how to use the good parts of JavaScript

Javascript: The Good Parts is another book related to JavaScript I read from O’Reilly Reader Review Program.

After more than 1 year of experience I tackled many problems covered in this book. Author did a good job to point out good & bad parts of JavaScript. Book as a whole is great overview of JavaScript as a programming language — after introductory chapter, author covers: grammar (with nice railroad diagrams :-)), objects, functions (with important topics like: callback, closure, scope), array, regular expressions, style and more.

I have to admit that I browsed Chapter 8 because it is documentation with some examples for methods.

Actually after all those chapters, the most intriguing are appendices: A (Awful Parts), B (Bad Parts). Most of them I am already familiar with, but it is good to be reminded.

After longer experience with JavaScript, this book is nice overview.

So if you need more thorough book about JavaScript, I recommend you JavaScript: The Definitive Guide, http://shop.oreilly.com/product/9780596805531.do

My rating:

Product page: http://shop.oreilly.com/product/9780596517748.do

I review for the O'Reilly Blogger Review Program

Review: „JavaScript Design Patterns”

cover

Patterns in JavaScript developer’s life

I read several books about JavaScript, many articles. This time I decided to go through Javascript Design Patterns.

Books consists of 2 „parts”. First 6 chapters are mostly introductory. They are answers for following question: what is design pattern? when should I use patterns? what is good structure of design pattern? when and how should I write my own patterns? what can I learn from anti-patterns? Then, there is part about design patterns. I really like Addy’s approach in book:  every pattern has diagram (to visualize concept), code (to see real implementation), more examples (when pattern has some „flavours”), references (to read more), discussion (about advantages and disadvantages).

Especially I like chapter about MV* patterns. It gave me more insights about structuring JavaScript applications.

If you are writing a lot of code in JavaScript/CoffeeScript, I recommend this book to you.

My rating:

Product page: http://shop.oreilly.com/product/0636920025832.do

I review for the O'Reilly Blogger Review Program

Review: „Hacking Web Apps”

cover

Be more security-aware developer/user

As a web developer I learned many things about security in the day-to-day practice. I admit that Hacking Web Apps is very good overview of different ways to hack web app with useful examples. Every chapter covers specific group of hacks (e.g. XSS, CSRF, SQL injection, logic attacks and so on) and countermeasures for them. Examples are pretty useful, ready to check on existing websites (of course those you own ;-)). No matter if you are developer or user, after reading this book you’ll be much more aware of security and privacy issues.

My rating:

Product page: http://shop.oreilly.com/product/9781597499514.do

I review for the O'Reilly Blogger Review Program

Refactoring legacy code

Recently I’m trying to upgrade one big project from Ruby 1.8.7 to 1.9.3.
It is bumpy road but here are some thoughts gathered during this time:

1. Make small steps – especially when pushing those changes to production. You’ll never know what are going to break.
2. When changing API endpoint find every call to that endpoint. Record HTTP requests & responses and test them.
3. Improve test coverage. The more good specs you have, the better.
4. Update only necessary gems to get your code working on Ruby 1.9.3.
5. Set up Continuous Integration server to run specs on both Ruby versions: 1.8.7 & 1.9.3.
6. Analyze & understand business logic in code. Use metric_fu, simplecov to know more about code.
7. Delete unused code.

FTP server on OS X 10.8.5

On my OS X 10.8.5 I tried to do specific task: I want to set up FTP server where user has full access to that specific place — he can upload/download and remove files without any problems. After spending some time with this I came to solution to create new user in system and set configuration of /etc/ftpd.conf to sth like that:

chroot REAL /path/to/directory
modify all
upload all

To start & stop FTP server I used those commands

sudo -s launchctl load -w /System/Library/LaunchDaemons/ftp.plist
sudo -s launchctl unload -w /System/Library/LaunchDaemons/ftp.plist

Those resources were helpful for me:
Start an FTP or SFTP Server in Mac OS X
OS X: anonymous ftp directory on Mountain Lion

Review: „RESTful Web APIs”

cover

Good reference book

In my current project I use JSON heavily as representation when „talking to” servers. I decided to read that book and possibly get some insights how design better APIs.

First three chapters are reminder how HTTP works, its semantics a protocol and what exactly REST stands for. As an example authors use simple microblog service. Consecutive chapters cover hypermedia, the collection pattern, the design procedure and much more.

From my perspective the most interesting part (& most useful) were chapter devoted to the collection pattern and discussion about minimising semantic gap. From my developer’s point of view: using consistent, well-defined structure for JSON responses can simplify parsing and it’s easier to manage.

What I miss in this book are more complex „real-life” examples. I like academic discussions but I like practical examples more :)

My rating:

Product page: http://shop.oreilly.com/product/0636920028468.do

I review for the O'Reilly Blogger Review Program

Review: „iOS 6 Programming Cookbook”

cover

Cook your iOS apps

I like cookbooks and iOS6 Programming Cookbook is no exception. Author covers a lot of practical knowledge: basics of Objective-C, UI solutions, Xcode features (e.g. Interface Builder, Storyboards), concurrency, gestures, maps, networking, graphics, motion and many more.

Vandad presents material clearly, solutions contains screenshots, schemes, references and code to understand and implement it.

iOS6 Programming Cookbook is good reference book and I can recommend it to every iOS developer/hobbyist.

My rating:

Product page: http://shop.oreilly.com/product/0636920027683.do

I review for the O'Reilly Blogger Review Program

Review: „Randal Schwartz on Learning Perl”

cover

Perl from the ground up

Learning Perl Video is almost 11 hours long lectures covering Perl from the ground up. Randal Schwartz presents concepts and quirks in Perl step by step. Videos are nicely divided by topics. Every video is shorter than 1 hours, so it’s optimal to pay attention to presented material and take break between videos.

Randal presents material clearly, tells some anecdotes but there are not too many examples. Hands-on experience seems to me vital when learning programming language and I checked many code snippets when I watched those lectures.

My rating:

Product page: http://shop.oreilly.com/product/0636920014430.do

I review for the O'Reilly Blogger Review Program

Obserwuj

Otrzymuj każdy nowy wpis na swoją skrzynkę e-mail.