C awesomeness (not)


Few days ago I was asked question what would be the output of this code:

#include <stdio.h>
int main()
      int a = 5;

      printf("%d %d %d %d\n",a++,a++,++a,a++);

      return 0;

Nothing special, right? But C standard do not specify how printf evaluates it’s parameters, so it’s left up to the C compiler and here the fun part starts.

Old C compilers would be a bit more predictable as they would start evaluating from the top of the stack to the bottom i.e. right to left, but the new ones heavy optimize and try to execute some instructions in parallel, so the only certain thing is that at the printf “;” point of synchronization “a” would be incremented 4 time, but nobody knows in what order.

Compiled with GCC/Code Blocks the output is:

Screenshot from 2019-02-20 11-46-45

Again nobody guarantee that if you re-compile on different computer /CPU the result will be same!

Even changing the code with one more line like enter the value of a with scanf leads to different result:

Screenshot from 2019-02-20 11-47-47

So good practice will be to avoid any calculations inside printf and to search logic there. Do these separately where compiler has to stick to C standard and rules.


MOD-LCD3310 OSHW monochrome LCD 84×48 pixels board with UEXT connector


MOD-LCD3310 is Open Source Hardware board released under Apache 2.0 Licensee.
It’s low cost 84×48 pixels LCD which can connect to any of our development boards with UEXT connectors.
The schematic in PDF format and Board and Schematic files in Eagle CAD format are on GitHub.

Examples how to connect MOD-LCD3310 to OLIMEXINO-32U4 (Arduino Leonardo), OLIMEXINO-STM32 (Maple), PIC32-PINGUINO (Pinguino), A20-OLinuXino-MICRO, LPC-P1227 (NXP) and STM32-P103 (ST) are on GitHub.

The LCD panel alone is also available for purchase on our web shop


backlight panel


and the matching connector


which you can use to make your own PCBs with this display for your next project.

Collection of 51 free e-books for Python programming


Python now is what BASIC was in 1980s . With the broad range of modules for any purpose there is hard to find problem which can’t be solved with this easy to learn and use language.

OLinuXino OSHW Linux computers can be programmed with Python and you can have access to all GPIOs, I2C, SPI, UARTs etc resources using py modules.

Enjoy this free e-book collection with Python resources:

1. Learning to Program Using Python

Author: Cody Jackson, 2013

An introduction to computer programming, using the easy, yet powerful, Python programming language. Python, a cross-platform language, lets you work quickly and efficiently, allowing you to concentrate on your work rather than the language.

2. Introduction to Programming Using Python

Author: Brian Heinold

Publisher: Mount St. Mary’s University, 2013

Partly a tutorial and partly a reference book. I summarize information in tables and give a lot of short example programs. I also jump right into things and fill in background information as I go, rather than covering the background material first.

3. A Beginner’s Python Tutorial

Author: Steven Thurlow

Publisher: Wikibooks, 2013

Contents of Beginner’s Python Tutorial: Installing Python; Very Simple Programs; Variables, Scripts; Loops, Conditionals; Functions; Tuples, Lists, Dictionaries; for Loop; Classes; Importing Modules; File I/O; Exception Handling.

4. Python Cookbook

Author: David Beazley, Brian K. Jones

Publisher: O’Reilly Media, 2013

This cookbook is for experienced Python programmers who want to focus on modern tools and idioms. You’ll find complete recipes for more than a dozen topics, covering the core Python language as well as tasks common to a wide variety of applications.

5. Hacking Secret Ciphers with Python

Author: Al Sweigart, 2013

The book teaches complete beginners how to program in the Python programming language. The book features the source code to several ciphers and hacking programs for these ciphers. The programs include the Caesar cipher, transposition cipher, etc.

6. Effective Django

Author: Nathan Yergler

Publisher: PyCon, 2013

Effective Django development means building applications that are testable, maintainable, and scalable. After reading this book you should have an understanding of how Django’s pieces fit together and how to use them to engineer web applications.

7. Test-Driven Development with Python

Author: Harry Percival

Publisher: O’Reilly Media, 2013

Test-Driven Development with Python focuses on web development, with some coverage of JavaScript. This book uses a concrete example — the development of a website, from scratch — to teach the TDD methodology and how it applies to web programming.

8. PyQt4 Tutorial

Author: Jan Bodnar

Publisher: ZetCode, 2013

PyQt4 is a toolkit for creating GUI applications. It is a blending of Python language and the successful Qt library. This tutorial is suited for beginners and intermediate programmers. You will learn to program non trivial PyQt4 applications.

9. Python Programming

Author: Hannes Röst, et al.

Publisher: Wikibooks, 2013

This book describes Python, an open-source general-purpose interpreted programming language, available for all Platforms. Python is a high-level, structured programming language that can be used for a wide variety of programming tasks.

10. Python Scientific Lecture Notes

Author: EuroScipy tutorial team, 2012

Teaching material on the scientific Python ecosystem, a quick introduction to central tools and techniques. The different chapters each correspond to a 1 to 2 hours course with increasing level of expertise, from beginner to expert.

11. The Art and Craft of Programming: Python Edition

Author: John C. Lusth

Publisher: The University of Alabama, 2012

Contents: Starting Out; Literals; Combining Literals; Precedence and Associativity; Variables; Assignment; Conditionals; Functions; Python Programs and Using Files; Input and Output; More about Functions; Scope; Loops; Lists; Recursion; etc.

12. Porting to Python 3: An in-depth guide

Author: Lennart Regebro

Publisher: Colliberty 2011

Porting to Python 3 doesn’t have to be daunting. This book guides you through the process of porting your Python 2 code to Python 3. Using plenty of code examples is takes you cross the hurdles and shows you the new Python features.

13. Introduction to Python for Econometrics, Statistics and Numerical Analysis

Author: Kevin Sheppard, 2012

Python is a widely used general purpose programming language, which happens to be well suited to Econometrics and other more general purpose data analysis tasks. These notes provide an introduction to Python for a beginning programmer.

14. Python Scripting for Computational Science

Author: Hans Petter Langtangen

Publisher: Springer, 2009

With a primary focus on examples and applications of relevance to computational scientists, this useful book shows computational scientists how to develop tailored, flexible, and human-efficient working environments built from small scripts.

15. The Programming Historian

Author: W.J. Turkel, A. Crymble, A. MacEachern

Publisher: NiCHE, 2010

This book is a tutorial-style introduction to programming in Python for practicing historians (and other humanists). We assume that you’re starting out with no prior programming experience and only a basic understanding of computers.

16. Programming Computer Vision with Python

Author: Jan Erik Solem

Publisher: O’Reilly Media, 2012

The idea behind this book is to give an easily accessible entry point to hands-on computer vision with enough understanding of the underlying theory and algorithms to be a foundation for students, researchers and enthusiasts.

17. Design Patterns In Python

Author: Rahul Verma, Chetan Giridhar

Publisher: Testing Perspective, 2011

This book is about learning design patterns with Python language. If you are new to design patterns, this text provides the first building blocks. If you are interested in design of test automation frameworks, this book will be very useful.

18. Making Games with Python and Pygame

Author: Al Sweigart, 2012

This is a programming book that covers the Pygame game library for the Python programming language. Each chapter gives you the complete source code for a new game and teaches the important programming concepts from these examples.

19. Learning to Program with Python

Author: Richard L. Halterman

Publisher: Southern Adventist University, 2011

The focus is on introducing programming techniques and developing good habits. Our approach avoids some more esoteric features of Python and concentrates on the programming basics that transfer directly to other imperative programming languages.

20. How to Think Like a Computer Scientist: Learning with Python

Author: Jeffrey Elkner, Allen B. Downey, Chris Meyers

Publisher: Green Tea Press, 2012

This book is an introduction to computer science using the Python programming language. It covers the basics of programming, including variables, functions, control flow, program debugging. Later chapters cover basic algorithms and data structures.

21. Natural Language Processing with Python

Author: Steven Bird, Ewan Klein, Edward Loper

Publisher: O’Reilly Media, 2009

This book offers a highly accessible introduction to natural language processing, the field that supports a variety of language technologies. With it, you’ll learn how to write Python programs that work with large collections of unstructured text.

22. Learn Python The Hard Way

Author: Zed A. Shaw, 2011

This is a very beginner book for people who want to learn to code. If you can already code then the book will probably drive you insane. It’s intended for people who have no coding chops to build up their skills before starting a more detailed book.

23. Think Stats: Probability and Statistics for Programmers

Author: Allen B. Downey

Publisher: Green Tea Press, 2011

Think Stats is an introduction to Probability and Statistics for Python programmers. This new book emphasizes simple techniques you can use to explore real data sets and answer interesting statistical questions. Basic skills in Python are assumed.

24. Python for Informatics: Exploring Information

Author: Charles Severance

Publisher: PythonLearn, 2010

The goal of this book is to provide an Informatics-oriented introduction to programming. The primary difference between a computer science approach and the Informatics approach taken in this book is a greater focus on using Python.

25. Start Here: Python Programming for Beginners

Author: Jody Scott Ginther

Publisher: toonzcat.com, 2010

This book is meant to help you begin learning the basics of Python programming version 3 or later. It is a brief introduction to Python. The author attempts to be as brief as possible to get the new programmer into programming as fast as possible.

26. Practical Programming in Python

Author: Jeffrey Elkner, at al., 2010

The goal of this book is twofold: to teach you how to program in Python; and to teach you to think like a computer scientist. This way of thinking combines some of the best features of mathematics, engineering, and natural science.

27. Introduction to Media Computation: A Multimedia Cookbook in Python

Author: Mark Guzdial

Publisher: Georgia Institute of Technology, 2002

Guzdial introduces programming as a way of creating and manipulating media — a context familiar to today’s readers. Starts readers with actual programming early on. Puts programming in a relevant context (Computing for Communications).

28. Snake Wrangling for Kids

Author: Jason R Briggs

Publisher: Lulu.com, 2007

Snake Wrangling for Kids is a printable electronic book, for children 8 years and older, who would like to learn computer programming. It covers the very basics of programming, and uses the Python 3 programming language to teach the concepts.

29. The Definitive Guide to Django

Author: A. Holovaty, J. Kaplan-Moss

Publisher: Apress, 2007

Django is the Python–based equivalent to the Ruby on Rails web development framework. The authors show you how they use this framework to create award–winning web sites. This is the first edition of the Django Book which covers 0.96 version.

30. Python course in Bioinformatics

Author: Katja Schuerer, Catherine Letondal

Publisher: Pasteur Institute, 2008

This course is designed for biologists who already have some programming knowledge in other languages. The focus is on biological examples that are used throughout the course, as well as the suggested exercises drawn from the field of biology.

31. Python 201: (Slightly) Advanced Python Topics

Author: Dave Kuhlman, 2003

This document contains discussions of several advanced topics that are of interest to Python programmers: regular expressions, unit tests, extending and embedding Python, parsing, GUI applications, guidance on packages and modules.

32. Python 101: Introduction to Python

Author: Dave Kuhlman, 2008

This document is a syllabus for a first course in Python programming. It contains an introduction to the Python language, instruction in the important features of the language, and practical exercises in the use of those features.

33. Python for Fun

Author: Chris Meyers, 2004

This collection is a presentation of several small Python programs. They are aimed at intermediate programmers – people who have studied Python and are fairly comfortable with basic recursion and object oriented techniques.

34. The Python Imaging Library

Author: Fredrik Lundh, Matthew Ellis

Publisher: PythonWare, 2002

The Python Imaging Library adds image processing capabilities to your Python interpreter. This library provides extensive file format support, an efficient internal representation, and fairly powerful image processing capabilities.

35. Python Tutorial

Publisher: Python Software Foundation, 2008

This tutorial introduces the reader informally to the basic concepts of the Python language and system. It introduces many of Python’s most noteworthy features, and will give you a good idea of the language’s flavor and style.

36. Python Quick Reference collection

Author: Richard Gruet, 2007

This reference collections cover references for python version 1.52 to version 2.7. It covers invocation options, environment variables, lexical entities, basic types and their operations, advanced types, statements, iterators, generators, descriptors, decorators, built-in functions, built-in exceptions, and more.

37. How To Write Your Own Software Using Python

Author: Steven F. Lott, 2008

The book will help you build basic programming skills. It is organized in a way that builds up the language in layers from simple concepts to more advanced features. Programming exercises are provided to encourage further exploration of each layer.

38. The Python Language Reference Manual

Author: Guido Van Rossum

Publisher: Network Theory Ltd., 2003

The definitive language reference for Python. It describes the syntax of Python and its built-in datatypes. It covers advanced topics, and is suitable for readers who are familiar with the details and rules of the Python and its object system.

39. Data Structures and Algorithms with Object-Oriented Design Patterns in Python

Author: Bruno R. Preiss, 2004

The primary goal of this book is to promote object-oriented design using Python and to illustrate the use of the emerging object-oriented design patterns. The book shows how these patterns are used to create good software designs.

40. Think Python: An Introduction to Software Design

Author: Allen Downey

Publisher: Green Tea Press, 2008

A concise introduction to software design using Python. Intended for people with no programming experience, this book starts with the most basic concepts and gradually adds new material. The goal is to teach you to think like a computer scientist.

41. Learn to Program Using Python

Author: Alan Gauld

Publisher: Addison-Wesley Professional, 2000

Book for hobbyists, self-starters, and all who want to learn the art of computer programming in Python. Data types and variables, debugging, and namespaces are covered. Also includes sample applications that illustrate ideas and techniques in action.

42. Introduction to Programming using Python

Author: K. Schuerer, et al.

Publisher: Pasteur Institute, 2008

This text teaches programming concepts to biologists. It is aimed at people who are not professional computer scientists, but who need a better control of computers for their own research. This course is part of a course in informatics for biology.

43. Text Processing in Python

Author: David Mertz

Publisher: Addison-Wesley Professional, 2003

A hands-on tutorial that teaches how to accomplish numerous text processing tasks using Python. Filled with examples, the book provides efficient solutions to specific text processing problems and strategies for all text processing challenges.

44. A Byte of Python (for Python 3.0)

Author: Swaroop C H, 2008

This is a tutorial and a guide on Python programming for absolute beginners. If all you know about computers is how to save text files, then this is the book for you. The book is updated for the upcoming Python 3.0 language.

45. Non-Programmers Tutorial For Python

Author: Josh Cogliati

Publisher: Wikibooks, 2005

This free tutorial is designed to be an introduction to the Python programming language. The guide is for someone with no programming experience. The author attempts to teach programming by reading code and writing code.

46. Building Skills in Python

Author: Steven F. Lott, 2008

This book is a complete presentation of the Python for professional programmers who need to learn the language. The author leads you from a tiny, easy to understand subset of statements to the entire Python language and all built-in data structures.

47. Python Standard Library

Author: Fredrik Lundh

Publisher: O’Reilly, 2001

A large collection of useful Python scripts, the best parts of comp.lang.python newsgroup messages, plus hundreds of new scripts. The text covers the standard library, the examples should work on most platforms and Python versions.

48. GUI Programming with Python: QT Edition

Author: Boudewijn Rempt

Publisher: OpenDocs, LLC, 2002

This book covers application development using the library extension PyQt, which forms the basis for GUI programming. First part explains concepts using small examples, in the second part the author develops a complete, complex application.

49. Dive Into Python

Author: Mark Pilgrim

Publisher: Apress, 2004

This is a book for experienced programmers, a hands-on guide to the Python language. Each chapter starts with a complete code sample, picks it apart and explains the pieces, and then puts it all back together in a summary at the end.

50. An Introduction to Python

Author: Guido van Rossum

Publisher: Network Theory Ltd., 2006

This book is an introduction to Python, an easy to learn, powerful programming language. The tutorial explains the basics of the Python, it does not cover every single feature of the language, but introduces the most noteworthy features.

51. Invent Your Own Computer Games with Python

Author: Albert Sweigart

Publisher: Albert Sweigart, 2008

A programming book for kids interested in learning to program their own computer games with python, a serious computer language which is used by professional programmers also. The book explains programming principles from the source code examples.

Free online e-book: Build your own Lisp


Quote from the book – “Mike Tyson – Your typical Lisp user” 🙂

If you’re looking to learn C, or you’ve ever wondered how to build your own programming language, this is the book for you.

Free online e-book Speaking JavaScript



For these who want to learn JavaScript this is another free online e-book

Weekend Programming Challenge – Week #40 Solutions


We got 13 solutions:

  • Python x6
  • Perl x3
  • Java x1
  • C++ x1
  • C# x1
  • Haskell x1

The solutions are on GitHub as usual.

Free online eBook – Game Programming Patterns


Game Programming Patterns, is a book on architectural patterns in game code. If you ever struggle with the complexity of your game’s codebase, this book will help.


Free online e-book “The performance of Open Source Applications”


Interesting book about how to increase the performance of your code, each chapter is written by developer who worked on real project, who had to made an existing system faster.

They cover different goals, but what they have in common is a detailed understanding of what actually happens when, and how the different parts of large applications fit together.

Turbo Pascal 3.0 running in your browser – JavaScript implementation of the Legendary Compiler


Yet another amazing JS project – :awrence Kesteloot implemented Turbo Pascal IDE in Web browser.

You can browse the demo project with D, load the project with W and run it with R.

Sure you can also make your own Pascal code and run it. Have fun!

Sweet memories with Pascal programming many many years ago, this was the first really useful Pascal compiler which I had my hands on, although there was restriction for the code to fit in one segment of 64KB there was work around for bigger programs to compile them as overlays and load dynamically…

Free online e-book – Pragmatic D Language Tutorial


For these who are currious about learning more for D Language this is link to free online book: http://qznc.github.io/d-tut/hello.html

quote from there:

D is greatly inspired by C++ and inherit parts of its philosophy. D provides powerful abstraction mechanisms without sacrificing performance. If you are looking for a better C++, you should feel at home with D. If you dislike C++, you might like D for being C++ done right.

Previous Older Entries