]]>
]]>
]]>
]]>
]]>
]]>
Like this:
$ docker system df TYPE TOTAL ACTIVE SIZE RECLAIMABLE Images 7 2 5.129GB 4.806GB (93%) Containers 3 3 12.46MB 0B (0%) Local Volumes 4 3 7.627GB 230MB (3%) Build Cache 165 0 2.378GB 2.378GB
]]>
Like this:
$ docker system df TYPE TOTAL ACTIVE SIZE RECLAIMABLE Images 7 2 5.129GB 4.806GB (93%) Containers 3 3 12.46MB 0B (0%) Local Volumes 4 3 7.627GB 230MB (3%) Build Cache 165 0 2.378GB 2.378GB
]]>
If you visit the web site the only indication as to how to contribute to it I found was a small GitHub logo at the bottom that leads to the GitHub repository of VS Code
]]>
If you visit the web site the only indication as to how to contribute to it I found was a small GitHub logo at the bottom that leads to the GitHub repository of VS Code
]]>
]]>
]]>
]]>
]]>
]]>
]]>
When you run Docker on a linux host, mount an external folder, all the files created in the docker will be owned by user root on the host file-system.
Finally I think I understood how this works and found a solution. At least a partial solution for Ubuntu and CentOS-based images.
]]>
When you run Docker on a linux host, mount an external folder, all the files created in the docker will be owned by user root on the host file-system.
Finally I think I understood how this works and found a solution. At least a partial solution for Ubuntu and CentOS-based images.
]]>
]]>
]]>
Disclaimer: none of the participants had any experience in contributing to open source projects in R so we might have totally misunderstood how one should set up an environment.
]]>
Disclaimer: none of the participants had any experience in contributing to open source projects in R so we might have totally misunderstood how one should set up an environment.
]]>
]]>
]]>
Having a good description of the contribution process and the culture of the development team is crucial, so is making it easy for a new potential developer to set up the local development environment and run the tests of a project locally.
It took me a while to find a PHP project that was simple enough for me to set up on a single Docker image, but after some trial and error I found the Twig project.
Funnily, only now, after managing the setup and staring to write this post did I realize that it is part of the Symfony project.
]]>
Having a good description of the contribution process and the culture of the development team is crucial, so is making it easy for a new potential developer to set up the local development environment and run the tests of a project locally.
It took me a while to find a PHP project that was simple enough for me to set up on a single Docker image, but after some trial and error I found the Twig project.
Funnily, only now, after managing the setup and staring to write this post did I realize that it is part of the Symfony project.
]]>
One could use the skiprows and the skipfooter parameters, but what if I don't the number of the rows we need to skip?
]]>
One could use the skiprows and the skipfooter parameters, but what if I don't the number of the rows we need to skip?
]]>
As I did not find this information for the requests Python library I am now trying to describe it myself.
]]>
As I did not find this information for the requests Python library I am now trying to describe it myself.
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
It has two buttons.
]]>
It has two buttons.
]]>
For example, I have a reminder every month to back up my data from LinkedIn. Primarily the list of my connections though now that I am writing this I'll also check how could I backup all my other data from LinkedIn.
This backup is kept in a private git repository on GitHub as well.
]]>
For example, I have a reminder every month to back up my data from LinkedIn. Primarily the list of my connections though now that I am writing this I'll also check how could I backup all my other data from LinkedIn.
This backup is kept in a private git repository on GitHub as well.
]]>
]]>
]]>
]]>
]]>
It took me quite a while and some back-and-forth with the author to make GitHub Actions work and even now some of the tests are failing. Here is what happened:
]]>
It took me quite a while and some back-and-forth with the author to make GitHub Actions work and even now some of the tests are failing. Here is what happened:
]]>
I was really surprised that my searches for this expression indicated that it is not used elsewhere. I wonder what is the expression in other languages for the same phenomenon.
]]>
I was really surprised that my searches for this expression indicated that it is not used elsewhere. I wonder what is the expression in other languages for the same phenomenon.
]]>
]]>
]]>
]]>
]]>
Finally I found this Perl module called Plack-Middleware-LogAny.
]]>
Finally I found this Perl module called Plack-Middleware-LogAny.
]]>
]]>
]]>
]]>
]]>
I asked the author if he would be interested in a GitHub Actions configuration.
]]>
I asked the author if he would be interested in a GitHub Actions configuration.
]]>
Yesterday the author updated the issue saying that it has been fixed so today I tried it again.
]]>
Yesterday the author updated the issue saying that it has been fixed so today I tried it again.
]]>
As always I started at the CPAN Digger. This time found the Log-Any distribution.
]]>
As always I started at the CPAN Digger. This time found the Log-Any distribution.
]]>
Just a few days ago as I started to work on the Open Source Developer Course I started to collect Open Source projects by governments and today the first project I found on PyDigger that I wanted to try to contribute to was a project of the NIST - the National Institute of Standards and Technology.
]]>
Just a few days ago as I started to work on the Open Source Developer Course I started to collect Open Source projects by governments and today the first project I found on PyDigger that I wanted to try to contribute to was a project of the NIST - the National Institute of Standards and Technology.
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
Today I picked another Perl module. As it turned out it wasn't such a "low-hanging-fruit" either as I was hoping for, but I managed to set up CI. At least on Ubuntu.
]]>
Today I picked another Perl module. As it turned out it wasn't such a "low-hanging-fruit" either as I was hoping for, but I managed to set up CI. At least on Ubuntu.
]]>
It wasn't supposed to be difficult but I encountered some issues and had to be pragmatic in the setup even if far from ideal.
IMHO it is better to have a working CI that already checks part of what can be checked than to have nothing.
]]>
It wasn't supposed to be difficult but I encountered some issues and had to be pragmatic in the setup even if far from ideal.
IMHO it is better to have a working CI that already checks part of what can be checked than to have nothing.
]]>
examples/python/name_main.py
if __name__ == '__main__': ...
In a nutshell it allows a file to be used both as a stand-alone program (script) and as a module imported by some other stand-alone program.
Let's see the explanation.
]]>
examples/python/name_main.py
if __name__ == '__main__': ...
In a nutshell it allows a file to be used both as a stand-alone program (script) and as a module imported by some other stand-alone program.
Let's see the explanation.
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
I looked at CPAN Digger where some Perl script collects and analyses the most recent uploads to CPAN, the central web site of of the Perl packages and MetaCPAN is the user-friendly place to view the content of all the packages.
]]>
I looked at CPAN Digger where some Perl script collects and analyses the most recent uploads to CPAN, the central web site of of the Perl packages and MetaCPAN is the user-friendly place to view the content of all the packages.
]]>
]]>
]]>
]]>
]]>
I am going to combine the ideas and write an article every day on how I configured Continuous Integration for an Open Source project and I would like to challenge you to do the same!
]]>
I am going to combine the ideas and write an article every day on how I configured Continuous Integration for an Open Source project and I would like to challenge you to do the same!
]]>
]]>
]]>
It is not like that. Each letter, each number, each punctuation (e.g. !?:) has a number and that number is stored.
Then the various programs you use to show that file will automatically convert the number to the drawing you are familiar with.
]]>
It is not like that. Each letter, each number, each punctuation (e.g. !?:) has a number and that number is stored.
Then the various programs you use to show that file will automatically convert the number to the drawing you are familiar with.
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
I am not trying to convince you to write in Functional programming. I definitely don't want you to write everything in functional programming style. Partially because probably you cannot.
If you really want to explore pure functional programming then pick up one of the purely functional programming language.
Instead of that I'd like to show you that you are probably already using various features of Python that are more aligned with the functional programming paradigm.
I am going to show you various further tools to improve that.
]]>
I am not trying to convince you to write in Functional programming. I definitely don't want you to write everything in functional programming style. Partially because probably you cannot.
If you really want to explore pure functional programming then pick up one of the purely functional programming language.
Instead of that I'd like to show you that you are probably already using various features of Python that are more aligned with the functional programming paradigm.
I am going to show you various further tools to improve that.
]]>
]]>
]]>
]]>
]]>
In this video we take a look at one of the simple algorithms and how it is being tested.
]]>
In this video we take a look at one of the simple algorithms and how it is being tested.
]]>
These are 3 entities involved in running Docker.
]]>
These are 3 entities involved in running Docker.
]]>
]]>
]]>
I provide help to individuals and teams with training, techniques, and tools for test automation, CI, and CD.
]]>
I provide help to individuals and teams with training, techniques, and tools for test automation, CI, and CD.
]]>
]]>
]]>
I thought this could be a good opportunity to see how is the GitHub Actions configuration file offered by GitHub itself.
]]>
I thought this could be a good opportunity to see how is the GitHub Actions configuration file offered by GitHub itself.
]]>
I found xhash package.
]]>
I found xhash package.
]]>
Not only that, but when I looked at the repository I noticed it does not have any tests.
So I thought I could add both, but to do that I needed to understand how it works.
]]>
Not only that, but when I looked at the repository I noticed it does not have any tests.
So I thought I could add both, but to do that I needed to understand how it works.
]]>
The default is true meaning they should be cancelled.
This usually makes sense because you already have something to fix and you don't want to waste the resources of GitHub Actions to run many other similar jobs if one fails.
This case was different.
]]>
The default is true meaning they should be cancelled.
This usually makes sense because you already have something to fix and you don't want to waste the resources of GitHub Actions to run many other similar jobs if one fails.
This case was different.
]]>
While trying to enable GitHub Actions CI to this small Python package called once-utils I bumped into two issues:
1. Some of the tests required gradle to be installed, somehting that seemed arbitrary and not very straigh forward to have.
2. There was no easy way to install all the dependencies. (No requirements.txt file)
See the PyDigger stats page for more modules that don't have Continuous Integration.
]]>
While trying to enable GitHub Actions CI to this small Python package called once-utils I bumped into two issues:
1. Some of the tests required gradle to be installed, somehting that seemed arbitrary and not very straigh forward to have.
2. There was no easy way to install all the dependencies. (No requirements.txt file)
See the PyDigger stats page for more modules that don't have Continuous Integration.
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
The video started at the PyDigger project.
]]>
The video started at the PyDigger project.
]]>
]]>
]]>
How can this be done in Python and how can one create a file that will display part of its content using colors even if you just "cat"-it?
]]>
How can this be done in Python and how can one create a file that will display part of its content using colors even if you just "cat"-it?
]]>
The same with the return value of a function. We might have a function that would normally return a floating point number, but sometimes it might return None. How can you give type-checking hints so mypy will accept the situation?
In another article we already saw how to handle the case when a function parameter can have more than one type. Now we'll see a special case of that, when one of the potential values is None.
In other words, when the value is optional.
]]>
The same with the return value of a function. We might have a function that would normally return a floating point number, but sometimes it might return None. How can you give type-checking hints so mypy will accept the situation?
In another article we already saw how to handle the case when a function parameter can have more than one type. Now we'll see a special case of that, when one of the potential values is None.
In other words, when the value is optional.
]]>
I have encountered this when writing a dictionary. Most words had a single translation so mapping a word to string made sense, but some words had multiple translations in which case we used a list of strings to represent them.
Then we had to write a function to handle a value that can be either a string or a list.
We ended up with the following solution:
]]>
I have encountered this when writing a dictionary. Most words had a single translation so mapping a word to string made sense, but some words had multiple translations in which case we used a list of strings to represent them.
Then we had to write a function to handle a value that can be either a string or a list.
We ended up with the following solution:
]]>
]]>
]]>
For more details see the documentation of the sidenav
]]>
For more details see the documentation of the sidenav
]]>
For more details see the documentation of the sidenav
]]>
For more details see the documentation of the sidenav
]]>
For more details see the documentation of the sidenav
]]>
For more details see the documentation of the sidenav
]]>
For more details see the documentation of the grid
]]>
For more details see the documentation of the grid
]]>
Removing this div element or removing the container class from it will make the site take up the full width of the browser. Check the skeleton to see it.
For more details see the beginning of documentation of the grid where this is mentioned.
]]>
Removing this div element or removing the container class from it will make the site take up the full width of the browser. Check the skeleton to see it.
For more details see the beginning of documentation of the grid where this is mentioned.
]]>
The sample content is from Lorem Ipsum.
]]>
The sample content is from Lorem Ipsum.
]]>
Here we are going to see a few basic examples. Below each example you'll find a link that says Try!. You can click on it to see the example in your browser.
]]>
Here we are going to see a few basic examples. Below each example you'll find a link that says Try!. You can click on it to see the example in your browser.
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
This can be done safely if there is only a single person working on such branch and if everyone looking at that branch is aware that this might happen.
However there are certain situations when this technique cannot be used. For example if repository syncing is set up (e.g. between BitBucket and GitLab) then a push --force will stop the syncing of that branch.
My solution for this situation is to create a new branch based on the first one. e.g.
]]>
This can be done safely if there is only a single person working on such branch and if everyone looking at that branch is aware that this might happen.
However there are certain situations when this technique cannot be used. For example if repository syncing is set up (e.g. between BitBucket and GitLab) then a push --force will stop the syncing of that branch.
My solution for this situation is to create a new branch based on the first one. e.g.
]]>
It helps us create a new function where some of the original arguments have fixed values.
]]>
It helps us create a new function where some of the original arguments have fixed values.
]]>
A great way to improve your Python project is to configure your CI-system to run flake8 every time you push out code to ensure your code does not start to accumulate such issues.
How can you get started with flake8 on an already existing project?
]]>
A great way to improve your Python project is to configure your CI-system to run flake8 every time you push out code to ensure your code does not start to accumulate such issues.
How can you get started with flake8 on an already existing project?
]]>
TL;DR
Keep the list of immediate dependencies in requirements.txt without declaring version numbers.
Keep the output of pip freeze with the specific version numbers in constraints.txt.
]]>
TL;DR
Keep the list of immediate dependencies in requirements.txt without declaring version numbers.
Keep the output of pip freeze with the specific version numbers in constraints.txt.
]]>
Also follow the YouTube channel of Ivett: Cup of Code.
]]>
Also follow the YouTube channel of Ivett: Cup of Code.
]]>
That is variable that will be available somehow globally in all the packages.
]]>
That is variable that will be available somehow globally in all the packages.
]]>
Now we are going to see how to test the image.
]]>
Now we are going to see how to test the image.
]]>
How can one save the image to disk and how can one create a binary object of it in memory.
]]>
How can one save the image to disk and how can one create a binary object of it in memory.
]]>
]]>
]]>
Part 1 of the Crystal course
]]>
Part 1 of the Crystal course
]]>
]]>
]]>
In this series of meetings we are going to learn the Crystal programming language together.
]]>
In this series of meetings we are going to learn the Crystal programming language together.
]]>
This solution is written in the Crystal programming language.
]]>
This solution is written in the Crystal programming language.
]]>
This is my implementation in the Crystal language.
At first I thought to convert the number to its binary representation and do the swapping there, but then I fugured it is just a simple mathematical operation.
]]>
This is my implementation in the Crystal language.
At first I thought to convert the number to its binary representation and do the swapping there, but then I fugured it is just a simple mathematical operation.
]]>
This is a solution in the Crystal programming language.
]]>
This is a solution in the Crystal programming language.
]]>
They can use a testing matrix to run the tests on a number of different platforms, architectures, and versions of your programming language, but that's still very far from covering all the possibilities.
In addition they usually test their code with the latest version of their dependencies.
You have good chance that the code was never tested on a system like yours.
How can you be confident that the code you just installed works as expected on your computer as well?
]]>
They can use a testing matrix to run the tests on a number of different platforms, architectures, and versions of your programming language, but that's still very far from covering all the possibilities.
In addition they usually test their code with the latest version of their dependencies.
You have good chance that the code was never tested on a system like yours.
How can you be confident that the code you just installed works as expected on your computer as well?
]]>
The resulting Pull Request
]]>
The resulting Pull Request
]]>
Also follow the YouTube channel of Ivett: Cup of Code.
]]>
Also follow the YouTube channel of Ivett: Cup of Code.
]]>
ptpython is such a REPL.
]]>
ptpython is such a REPL.
]]>
]]>
]]>
]]>
]]>
Red for when there are non-committed files, yellow when everything is committed, but some changes have not been pushed to remote yet, and green when the directory is clean.
Of course it works on the current branch so if you have unpushed commits in other branches this won't indicate it.
]]>
Red for when there are non-committed files, yellow when everything is committed, but some changes have not been pushed to remote yet, and green when the directory is clean.
Of course it works on the current branch so if you have unpushed commits in other branches this won't indicate it.
]]>
]]>
]]>
Out of the several options we'll see setting up your own Runner and using Docker on it.
]]>
Out of the several options we'll see setting up your own Runner and using Docker on it.
]]>
We are going to speak in English.
]]>
We are going to speak in English.
]]>
Also follow the YouTube channel of Ivett: Cup of Code.
]]>
Also follow the YouTube channel of Ivett: Cup of Code.
]]>
]]>
]]>
Also follow the YouTube channel of Ivett: Cup of Code.
]]>
Also follow the YouTube channel of Ivett: Cup of Code.
]]>
Also follow the YouTube channel of Ivett: Cup of Code.
]]>
Also follow the YouTube channel of Ivett: Cup of Code.
]]>
Also follow the YouTube channel of Ivett: Cup of Code.
]]>
Also follow the YouTube channel of Ivett: Cup of Code.
]]>
Also follow the YouTube channel of Ivett: Cup of Code.
]]>
Also follow the YouTube channel of Ivett: Cup of Code.
]]>
]]>
]]>
]]>
]]>
]]>
]]>
Also follow the YouTube channel of Ivett: Cup of Code.
]]>
Also follow the YouTube channel of Ivett: Cup of Code.
]]>
These extensions are sometimes referred to as modules or libraries or packages.
Sometime they get a different name.
]]>
These extensions are sometimes referred to as modules or libraries or packages.
Sometime they get a different name.
]]>
]]>
]]>
]]>
]]>
The project has a Flask Python back-end and a ReactJS front-end.
]]>
The project has a Flask Python back-end and a ReactJS front-end.
]]>
The project has a Flask Python back-end and a ReactJS front-end.
]]>
The project has a Flask Python back-end and a ReactJS front-end.
]]>
Also follow the YouTube channel of Ivett: Cup of Code.
]]>
Also follow the YouTube channel of Ivett: Cup of Code.
]]>
Also follow the YouTube channel of Ivett: Cup of Code.
]]>
Also follow the YouTube channel of Ivett: Cup of Code.
]]>
]]>
]]>
Encouraged by the posts of Mark Gardner I wanted to implement it using JavaScript only. This is what I got:
]]>
Encouraged by the posts of Mark Gardner I wanted to implement it using JavaScript only. This is what I got:
]]>
For example when you run a program on the terminal and press Ctrl-C the default behavior is to quit the program.
In this example we override that behavior and instead we ask the user if s/he really want to quit or if we can continue running.
]]>
For example when you run a program on the terminal and press Ctrl-C the default behavior is to quit the program.
In this example we override that behavior and instead we ask the user if s/he really want to quit or if we can continue running.
]]>
]]>
]]>
The project has a Flask Python back-end and a ReactJS front-end.
]]>
The project has a Flask Python back-end and a ReactJS front-end.
]]>
Also follow the YouTube channel of Ivett: Cup of Code.
]]>
Also follow the YouTube channel of Ivett: Cup of Code.
]]>
We created a Docker container for the project. A docker-compose file and set up GitHub Actions for CI.
]]>
We created a Docker container for the project. A docker-compose file and set up GitHub Actions for CI.
]]>
]]>
]]>
]]>
]]>
We will also attempt to set up a full ELK stack.
We will start where we left of las time when FErki gave us an introduction to Rex
]]>
We will also attempt to set up a full ELK stack.
We will start where we left of las time when FErki gave us an introduction to Rex
]]>
]]>
]]>
Follow Olga Tapinova, check out the budgeting project.
Check out the video about the budgeting project of Olga.
]]>
Follow Olga Tapinova, check out the budgeting project.
Check out the video about the budgeting project of Olga.
]]>
]]>
]]>
]]>
]]>
Also remember that the perl code around the Rex commands are always executed locally on the management server.
This example demonstrates these cases:
]]>
Also remember that the perl code around the Rex commands are always executed locally on the management server.
This example demonstrates these cases:
]]>
]]>
]]>
]]>
]]>
See the whole series about Rex
We have reviewed the Rexfile used to install Apache, CGI, PSGI, and Starman and we have also reviewd the example to reboot a remote server using Rexify.
]]>
See the whole series about Rex
We have reviewed the Rexfile used to install Apache, CGI, PSGI, and Starman and we have also reviewd the example to reboot a remote server using Rexify.
]]>
]]>
]]>
We started where we left of last time when FErki gave us an introduction to Rex.
]]>
We started where we left of last time when FErki gave us an introduction to Rex.
]]>
]]>
]]>
Add several pages to the PDF file.
See also Creating PDF files using Python and reportlab
]]>
Add several pages to the PDF file.
See also Creating PDF files using Python and reportlab
]]>
Add several pages to the PDF file.
See also Creating PDF files using Python and reportlab
]]>
Add several pages to the PDF file.
See also Creating PDF files using Python and reportlab
]]>
See also Creating PDF files using Python and reportlab
]]>
See also Creating PDF files using Python and reportlab
]]>
We started from an empty management machine. Installed Rex. Created two Ubuntu-based servers. First we had some basic experimentation with Rex then installed and configured Nginx.
]]>
We started from an empty management machine. Installed Rex. Created two Ubuntu-based servers. First we had some basic experimentation with Rex then installed and configured Nginx.
]]>
]]>
]]>
Follow me on Twitch to join more live session!
]]>
Follow me on Twitch to join more live session!
]]>
]]>
]]>
]]>
]]>
The solution:
The users can run the code in google colab, it asks them for the CSV files and the required cycle number, and it prints the appropriate figure!
]]>
The solution:
The users can run the code in google colab, it asks them for the CSV files and the required cycle number, and it prints the appropriate figure!
]]>
Scheduled jobs will use the default values. Users running the job manually can set the parameters.
]]>
Scheduled jobs will use the default values. Users running the job manually can set the parameters.
]]>
For our example the condition is very simple, the length of a string being longer than 5 characters.
Oh and if you are interested, I also wrote a solution to find the first matching element using Perl where there is a function called first.
]]>
For our example the condition is very simple, the length of a string being longer than 5 characters.
Oh and if you are interested, I also wrote a solution to find the first matching element using Perl where there is a function called first.
]]>
In this article we'll review a GitLab CI job that creates the image and pushes it out to the container registry.
]]>
In this article we'll review a GitLab CI job that creates the image and pushes it out to the container registry.
]]>
]]>
]]>
In this video she discribes her project.
]]>
In this video she discribes her project.
]]>
We are going to go over a script that was taken from the Perl builder project of Ioan Rogers and that you can find at the bottom of this page.
While some of the commands are Perl specific, they only deal with the installation of Perl-based packages. You can easily replace them with similar commands installing the packages of the project you work on.
]]>
We are going to go over a script that was taken from the Perl builder project of Ioan Rogers and that you can find at the bottom of this page.
While some of the commands are Perl specific, they only deal with the installation of Perl-based packages. You can easily replace them with similar commands installing the packages of the project you work on.
]]>
The first and probably the obvious suggestion is to contribute to a project you use as there you will have much more motivation.
That's true, however it is quite likely that you use mostly well-known and well-established projects where most of the easy things are already done.
So it will be relatively hard to make a difference, especially if you are relatively new to Python.
]]>
The first and probably the obvious suggestion is to contribute to a project you use as there you will have much more motivation.
That's true, however it is quite likely that you use mostly well-known and well-established projects where most of the easy things are already done.
So it will be relatively hard to make a difference, especially if you are relatively new to Python.
]]>
I would like to have a similar for my command line on Linux. Either running the commands with some prefix or automatically on every command on the terminal. Maybe on every long running command.
]]>
I would like to have a similar for my command line on Linux. Either running the commands with some prefix or automatically on every command on the terminal. Maybe on every long running command.
]]>
]]>
]]>
]]>
]]>
Seems to work out of the box. At least on Linux.
]]>
Seems to work out of the box. At least on Linux.
]]>
I am wondering why it came up now? What is different from the previous 20+ years when they released software? And how can we really measure confidence?
]]>
I am wondering why it came up now? What is different from the previous 20+ years when they released software? And how can we really measure confidence?
]]>
What is their current situation?
Where do they want to be?
When do they want to get there?
]]>
What is their current situation?
Where do they want to be?
When do they want to get there?
]]>
]]>
]]>
Once you have Rakudo installed, open a Terminal (or Command Prompt in MS Windows) and type in raku. If you are using the Docker version of Rakudo Star then run it in interactive mode as
docker run --rm -it rakudo-star
After a second or so, you will see:
]]>
Once you have Rakudo installed, open a Terminal (or Command Prompt in MS Windows) and type in raku. If you are using the Docker version of Rakudo Star then run it in interactive mode as
docker run --rm -it rakudo-star
After a second or so, you will see:
]]>
I have some background with the language from several years ago, but I am sure it changed since then and in any case I'll try to newly explore it.
]]>
I have some background with the language from several years ago, but I am sure it changed since then and in any case I'll try to newly explore it.
]]>
]]>
]]>
I use various services where I schedule meetings. For example I use italki to have Spanish classes with native speakers from Spain and Latin-America. (BTW It is awesome, try it!)
The offer a link that provides an ICS or iCal with my own schedule. The links looks like this: https://www.italki.com/calendar/ASGSAGGFADS/ics
]]>
I use various services where I schedule meetings. For example I use italki to have Spanish classes with native speakers from Spain and Latin-America. (BTW It is awesome, try it!)
The offer a link that provides an ICS or iCal with my own schedule. The links looks like this: https://www.italki.com/calendar/ASGSAGGFADS/ics
]]>
The various teams at my clients have different needs. I can offer one or more of the following services. Usually they all include a large amount of training. Either via formal courses or ad-hoc on the job training.
I can offer my servicaes on-site (as the situation allows) in Israel or on-line if we can match our working hours.
Spoken languages: English, Hebrew, Hungarian.
]]>
The various teams at my clients have different needs. I can offer one or more of the following services. Usually they all include a large amount of training. Either via formal courses or ad-hoc on the job training.
I can offer my servicaes on-site (as the situation allows) in Israel or on-line if we can match our working hours.
Spoken languages: English, Hebrew, Hungarian.
]]>
The courses can be offered in English, Hebrew, or Hungarian.
]]>
The courses can be offered in English, Hebrew, or Hungarian.
]]>
Anyway, if you have some HTML pages you might want to allow your users to move between pages, using JavaScript, but you don't want to rely any of the JavaScript libraries.
]]>
Anyway, if you have some HTML pages you might want to allow your users to move between pages, using JavaScript, but you don't want to rely any of the JavaScript libraries.
]]>
Some are Python-related, other cover other programming language.
A large part is DevOps-related.
]]>
Some are Python-related, other cover other programming language.
A large part is DevOps-related.
]]>
]]>
]]>
On this page you'll find a bunch of companies with some information about their Open Source projects.
In general you could easily find projects for most companies.
]]>
On this page you'll find a bunch of companies with some information about their Open Source projects.
In general you could easily find projects for most companies.
]]>
]]>
]]>
]]>
]]>
As we were converting our Shell scripts to Python anyway I thought I could rewrite it in Python and go over the file once instead of 20 times and use the Regex engine of Python to extract the same information.
The Python version should be faster as we all know file I/O is way more expensive than in-memory operations.
After starting conversion it turned out to be incorrect. Our code became way slower. Let's see a simulation of it.
]]>
As we were converting our Shell scripts to Python anyway I thought I could rewrite it in Python and go over the file once instead of 20 times and use the Regex engine of Python to extract the same information.
The Python version should be faster as we all know file I/O is way more expensive than in-memory operations.
After starting conversion it turned out to be incorrect. Our code became way slower. Let's see a simulation of it.
]]>
See also: Live web sites with Open Source code.
]]>
See also: Live web sites with Open Source code.
]]>
I have already created a list of Open Source Desktop applications, and there is also the beginning of the Open Source Web application frameworks and the Ready-made downloadable and deployable Open Source web applications so this time let's see the projects where you can have a direct impact on a live web site.
]]>
I have already created a list of Open Source Desktop applications, and there is also the beginning of the Open Source Web application frameworks and the Ready-made downloadable and deployable Open Source web applications so this time let's see the projects where you can have a direct impact on a live web site.
]]>
This always raises threww questions:
How can I hide the warnings?
How can I capture, collect, and report the warnings?
How can you create my own warnings?
]]>
This always raises threww questions:
How can I hide the warnings?
How can I capture, collect, and report the warnings?
How can you create my own warnings?
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
I think if you can see their side of the hiring-table, then you can improve your chances to get a job. You'll know how to improve your LinkedIn page and how you use LinkedIn. How to improve your CV, your searching strategy etc.
You'll also hear about the hiring process of each company and what are they really looking for in a new employee.
]]>
I think if you can see their side of the hiring-table, then you can improve your chances to get a job. You'll know how to improve your LinkedIn page and how you use LinkedIn. How to improve your CV, your searching strategy etc.
You'll also hear about the hiring process of each company and what are they really looking for in a new employee.
]]>
]]>
]]>
Unlike in those strongly typed languages, in Python a variable can be assigned a number and then replaced by a string. You can pass any type of value to a function parameter and Python will only complain if later, in the body of the function, that type turns out to be incompatible with an operation.
Recent versions of Python have started to allow you to declare the types of variables and function parameters, but Python itself does not (yet) do anything with these types.
However, the mypy project offers you a tool that will statically check your code and verify that the types are correct.
]]>
Unlike in those strongly typed languages, in Python a variable can be assigned a number and then replaced by a string. You can pass any type of value to a function parameter and Python will only complain if later, in the body of the function, that type turns out to be incompatible with an operation.
Recent versions of Python have started to allow you to declare the types of variables and function parameters, but Python itself does not (yet) do anything with these types.
However, the mypy project offers you a tool that will statically check your code and verify that the types are correct.
]]>
For the full list see the profile page on Leanpub.
]]>
For the full list see the profile page on Leanpub.
]]>
]]>
]]>
Almost everyone uses version control even if they don't use a real version control system.
]]>
Almost everyone uses version control even if they don't use a real version control system.
]]>
]]>
]]>
]]>
]]>
from tkinter import *
Instead of that it would be better to write:
import tkinter as tk
But why?
]]>
from tkinter import *
Instead of that it would be better to write:
import tkinter as tk
But why?
]]>
It was created because in many companies there were silos: Developers, (Maual) QA engineers, Operations and the communication among these silos was less than ideal. (also know as "really bad").
The DevOps movement eliminated the silos, made the whole process much smoother.
]]>
It was created because in many companies there were silos: Developers, (Maual) QA engineers, Operations and the communication among these silos was less than ideal. (also know as "really bad").
The DevOps movement eliminated the silos, made the whole process much smoother.
]]>
In this article I try to help you. Follow these instructions and you will improve your chances to find a job.
TL;DR: Contribute to open source projects and gain experience that way.
]]>
In this article I try to help you. Follow these instructions and you will improve your chances to find a job.
TL;DR: Contribute to open source projects and gain experience that way.
]]>
It is also quite easy to skip some of the subtrees.
]]>
It is also quite easy to skip some of the subtrees.
]]>
So what do you need to know in order to become one? What do you need to find a Junior level position with a title like that?
]]>
So what do you need to know in order to become one? What do you need to find a Junior level position with a title like that?
]]>
]]>
]]>
Articles on how to create and manipulate images using PIL, Pillow in Python.
]]>
Articles on how to create and manipulate images using PIL, Pillow in Python.
]]>
I also help companies introduce testing and test automation to their companies.
I also see that many companies are looking for Automation engineer or Test Automation engineer, or QA Automation engineer.
Let's see what kind of personality traits will help you in this position and do you need to know if you are interested in one of these positions?
]]>
I also help companies introduce testing and test automation to their companies.
I also see that many companies are looking for Automation engineer or Test Automation engineer, or QA Automation engineer.
Let's see what kind of personality traits will help you in this position and do you need to know if you are interested in one of these positions?
]]>
There are some slides about using .NET with Python.
]]>
There are some slides about using .NET with Python.
]]>
There are some slides about using .NET with Python.
]]>
There are some slides about using .NET with Python.
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
One, admittedly strange solution is to let your user execute any command on the Jenkins server without giving them ssh access.
]]>
One, admittedly strange solution is to let your user execute any command on the Jenkins server without giving them ssh access.
]]>
In the second stage we use the readFile function to read in the content of the file.
]]>
In the second stage we use the readFile function to read in the content of the file.
]]>
]]>
]]>
I contributed a bit to that project and created the web site of the project, but the project is not maintained any more and the website was shut down.
In any case you can find the sources in the Bailador GitHub project.
]]>
I contributed a bit to that project and created the web site of the project, but the project is not maintained any more and the website was shut down.
In any case you can find the sources in the Bailador GitHub project.
]]>
See other projects and exercises.
]]>
See other projects and exercises.
]]>
]]>
]]>
]]>
]]>
pip install reportlab
]]>
pip install reportlab
]]>
In other words, if Travis-CI is enabled and configured for your GitHub repository, then every time you push changes out to GitHub, Travis-CI will automatically run the test on the latest commit.
This is great, as it means you can get feedback for your changes within a few minutes.
]]>
In other words, if Travis-CI is enabled and configured for your GitHub repository, then every time you push changes out to GitHub, Travis-CI will automatically run the test on the latest commit.
This is great, as it means you can get feedback for your changes within a few minutes.
]]>
]]>
]]>
However during development you probably won't want to have a web server on your computer. For that time you probbaly need Flask to serve the static files as well.
Flask can do it easily, out of the box.
]]>
However during development you probably won't want to have a web server on your computer. For that time you probbaly need Flask to serve the static files as well.
Flask can do it easily, out of the box.
]]>
TLDR: add #!/bin/bash as the first line of your Bash script.
I ran a little experiment.
]]>
TLDR: add #!/bin/bash as the first line of your Bash script.
I ran a little experiment.
]]>
Sometime in a route that exists we might want to return a 404 error. For example we have a route that has a variable part for some content. (e.g. the ISBN number of a book.) Like this: /book/ISBN If the user accesses an ISBN number that does not exist our route will still be executed but now we would like to return a 404 error.
]]>
Sometime in a route that exists we might want to return a 404 error. For example we have a route that has a variable part for some content. (e.g. the ISBN number of a book.) Like this: /book/ISBN If the user accesses an ISBN number that does not exist our route will still be executed but now we would like to return a 404 error.
]]>
]]>
]]>
The -e tells Bash to stop immediately if one of the statements it executes has an exit-code different from 0.
]]>
The -e tells Bash to stop immediately if one of the statements it executes has an exit-code different from 0.
]]>
]]>
]]>
It is a very useful technique to lear from all the good and bad that happened during the project.
Python provides a way to do a sort of a "post mortem" of a Python program after it exits. Even if it exited in a very exceptional way.
Perl programmers might be familiar with the concept using an END block.
]]>
It is a very useful technique to lear from all the good and bad that happened during the project.
Python provides a way to do a sort of a "post mortem" of a Python program after it exits. Even if it exited in a very exceptional way.
Perl programmers might be familiar with the concept using an END block.
]]>
]]>
]]>
Apparently there is no single command for this, but it is easy to do:
]]>
Apparently there is no single command for this, but it is easy to do:
]]>
]]>
]]>
]]>
]]>
]]>
]]>
Lising the uptime of the remote host.
Declaring localhost (127.0.0.1) as the remote host inside the playbook to make the example simpler.
]]>
Lising the uptime of the remote host.
Declaring localhost (127.0.0.1) as the remote host inside the playbook to make the example simpler.
]]>
]]>
]]>
If you have a large project written using bash then it is even more important to make it directory independent. So developers can have the whole project in any location on their disk and it still functions.
In such case, however, how does a script find other files that come with the project? e.g. Imagaes or data files.
It is easy. Use relative pathes.
]]>
If you have a large project written using bash then it is even more important to make it directory independent. So developers can have the whole project in any location on their disk and it still functions.
In such case, however, how does a script find other files that come with the project? e.g. Imagaes or data files.
It is easy. Use relative pathes.
]]>
Luckily there is a command called realpath that will calculate and print the absolute path of a given path.
]]>
Luckily there is a command called realpath that will calculate and print the absolute path of a given path.
]]>
In Python it requires a bit more code, but it is easy to wrap it in a function.
]]>
In Python it requires a bit more code, but it is easy to wrap it in a function.
]]>
In normal shutdown situation the script has 90 seconds to run, in preemptible automatic shutdown it has 30 seconds to run before the computer is really shut down.
]]>
In normal shutdown situation the script has 90 seconds to run, in preemptible automatic shutdown it has 30 seconds to run before the computer is really shut down.
]]>
]]>
]]>
So on the network layer many of my users have IPv6 enabled, and my servers also have it, but how can I make sure the web server also serves both IPv4 and IPv6?
]]>
So on the network layer many of my users have IPv6 enabled, and my servers also have it, but how can I make sure the web server also serves both IPv4 and IPv6?
]]>
git tag -a annotation -m "some message"
The latter has its own annotator person and date and it can include a messge provided by the -m flag.
]]>
git tag -a annotation -m "some message"
The latter has its own annotator person and date and it can include a messge provided by the -m flag.
]]>
]]>
]]>
The function sprintf can be used to format a string for later use.
]]>
The function sprintf can be used to format a string for later use.
]]>
]]>
]]>
]]>
]]>
Memoization is usually the name of the process and one can write a generic Memoizer if that's needed. In this example we'll do the caching manually. We'll look at two implementation calculating the Levenshtein distance of strings.
]]>
Memoization is usually the name of the process and one can write a generic Memoizer if that's needed. In this example we'll do the caching manually. We'll look at two implementation calculating the Levenshtein distance of strings.
]]>
and, or, not
&&, ||, !
]]>
and, or, not
&&, ||, !
]]>
In many cases using recursive functions greatly simplifies the code we need to write.
For example when traversing some tree-like data structure.
One critical point in every recursive function is that there most be some stop-condition, that will not create further recursive calls. Otherwise we would end up in an infinite deep black hole.
]]>
In many cases using recursive functions greatly simplifies the code we need to write.
For example when traversing some tree-like data structure.
One critical point in every recursive function is that there most be some stop-condition, that will not create further recursive calls. Otherwise we would end up in an infinite deep black hole.
]]>
]]>
]]>
We have already seen that we need to tell Groovy how many parameter a function expects and we can even ask Groovy to verify the type of the parameters.
We have not discussed yet how can you be flexible with this?
Groovy allows you to define multiple versions of the same function with different signatures. That is, different set of expected parameters.
]]>
We have already seen that we need to tell Groovy how many parameter a function expects and we can even ask Groovy to verify the type of the parameters.
We have not discussed yet how can you be flexible with this?
Groovy allows you to define multiple versions of the same function with different signatures. That is, different set of expected parameters.
]]>
]]>
]]>
]]>
]]>
For example if you have more than one test scripts and each use the same filename then you cannot run the tests in parallel.
]]>
For example if you have more than one test scripts and each use the same filename then you cannot run the tests in parallel.
]]>
You'll need to tell the world using SPF1 and DKIM1 records that the IP addresses of Mailgun are approved to send out messages of your domain.
This will increase the likelihood of your messages arriving to their destinations and not flagged out by SPAM filters.
]]>
You'll need to tell the world using SPF1 and DKIM1 records that the IP addresses of Mailgun are approved to send out messages of your domain.
This will increase the likelihood of your messages arriving to their destinations and not flagged out by SPAM filters.
]]>
So here are a number of ways how you can reuse code in Groovy.
]]>
So here are a number of ways how you can reuse code in Groovy.
]]>
]]>
]]>
If we have fixed Jenkins agents it would be fast, because Jenkins would maintain a clone of the repository and would only need to update the repository with the most recent changes.
However in our situation we used on-demand started Google Compute Instances.
]]>
If we have fixed Jenkins agents it would be fast, because Jenkins would maintain a clone of the repository and would only need to update the repository with the most recent changes.
However in our situation we used on-demand started Google Compute Instances.
]]>
]]>
]]>
]]>
]]>
The standard example of a "Hello World" program is nice to get started, but usually way too simple. So I started to create a slightly more complex example. A counter example.
In each example we are going to create a counter. A simple counter will just increment a single number. A multi-counter will handle several counters. e.g. one per client, one per user, or one per some arbitrary string.
I think these counter example can show you several aspects of a programming environment and can help you get started writing your own applications.
]]>
The standard example of a "Hello World" program is nice to get started, but usually way too simple. So I started to create a slightly more complex example. A counter example.
In each example we are going to create a counter. A simple counter will just increment a single number. A multi-counter will handle several counters. e.g. one per client, one per user, or one per some arbitrary string.
I think these counter example can show you several aspects of a programming environment and can help you get started writing your own applications.
]]>
Using Coprime integers
]]>
Using Coprime integers
]]>
If given two parameters, thense defined the range of the charactes (beginning included, end excluded). If only one parameter is given this is the beginning of the substring.
The indexing is 0 based so STRING.substring(0,3) means the first 3 characters. and STRING.substring(4,7) means the charcter number, 5,6, and 7. (index 4, 5, and 6).
]]>
If given two parameters, thense defined the range of the charactes (beginning included, end excluded). If only one parameter is given this is the beginning of the substring.
The indexing is 0 based so STRING.substring(0,3) means the first 3 characters. and STRING.substring(4,7) means the charcter number, 5,6, and 7. (index 4, 5, and 6).
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
So you can say run on "master", "dev", and "feature/*" but you cannot say skip on "experiment".
]]>
So you can say run on "master", "dev", and "feature/*" but you cannot say skip on "experiment".
]]>
You might know about mocking methods of the random module and fixing the returned values. It is good because you can exactly say what should be the (fake) random values, but that is only reasonable if you have a very limited number of values that should be randomly generated.
If you have a need for a potentially much bigger set of random numbers you need something else. You might have read about repeating the same random number using seed. That's what we are going to use. We are going to fix the seed for testing.
]]>
You might know about mocking methods of the random module and fixing the returned values. It is good because you can exactly say what should be the (fake) random values, but that is only reasonable if you have a very limited number of values that should be randomly generated.
If you have a need for a potentially much bigger set of random numbers you need something else. You might have read about repeating the same random number using seed. That's what we are going to use. We are going to fix the seed for testing.
]]>
If you have a command and you'd like to know how much it takes you can use the time command. Measure time externally.
If you have a script and you'd like to measure how much various parts of it take you can use the date command. Measure time internally.
]]>
If you have a command and you'd like to know how much it takes you can use the time command. Measure time externally.
If you have a script and you'd like to measure how much various parts of it take you can use the date command. Measure time internally.
]]>
It can also get more web site owners to switch to https. After all it is quite easy to do it today using the free service of Let's encrypt.
]]>
It can also get more web site owners to switch to https. After all it is quite easy to do it today using the free service of Let's encrypt.
]]>
In a nutshell that means that the numbers seem to be random and can be used for various applications as if they were indeed random, but in fact they are just a really strange series of fixed numbers.
]]>
In a nutshell that means that the numbers seem to be random and can be used for various applications as if they were indeed random, but in fact they are just a really strange series of fixed numbers.
]]>
So what if you have the command as a string?
]]>
So what if you have the command as a string?
]]>
It is also a good practice to make sure the temporary directoy is unique so if two processes run at the same time they won't interfere.
]]>
It is also a good practice to make sure the temporary directoy is unique so if two processes run at the same time they won't interfere.
]]>
]]>
]]>
If you are an event organizer with a new group it might be tricky to find a good place for your gathering, but even if you already have a large group with a long history you might be interested to find alternative places to hold your events. It can broaden the membership and can make your group more accessible to pepple living and working in other areas of the country.
On this page you'll find some of the best venues where you can organize your events. The majority seem to be in the center of the country, especially in Tel Aviv, but I included information about other cities as well.
]]>
If you are an event organizer with a new group it might be tricky to find a good place for your gathering, but even if you already have a large group with a long history you might be interested to find alternative places to hold your events. It can broaden the membership and can make your group more accessible to pepple living and working in other areas of the country.
On this page you'll find some of the best venues where you can organize your events. The majority seem to be in the center of the country, especially in Tel Aviv, but I included information about other cities as well.
]]>
On both machines we need to have Python and the RPyC package installed and on the server we need to launch a process before we can talk to it. The nice thing is that it runs on all the 3 major Operating systems: Linux, Mac OSX, and MS Windows, and you can make RPyC between machines running different OS-es.
]]>
On both machines we need to have Python and the RPyC package installed and on the server we need to launch a process before we can talk to it. The nice thing is that it runs on all the 3 major Operating systems: Linux, Mac OSX, and MS Windows, and you can make RPyC between machines running different OS-es.
]]>
]]>
]]>
]]>
]]>
]]>
]]>
That is, unless we tell the filehandle to move around.
The tell method of the filehandle will return the current location of this pointer.
The seek method will move the pointer.
]]>
That is, unless we tell the filehandle to move around.
The tell method of the filehandle will return the current location of this pointer.
The seek method will move the pointer.
]]>
Alternatively, you can write your own JSON beautifier in one line of your facorite languge.
]]>
Alternatively, you can write your own JSON beautifier in one line of your facorite languge.
]]>
]]>
]]>
]]>
]]>
]]>
]]>
The really cool part is that a large chunk of the data can be received via their API free of charge. Let's see a simple example using their API from a Perl script.
]]>
The really cool part is that a large chunk of the data can be received via their API free of charge. Let's see a simple example using their API from a Perl script.
]]>
]]>
]]>
However I often find myself in situations where, for whatever technical, legal, or just plain stupid reason I cannot install it.
If you find yourself in similar situation, here are a few tools that might help you.
]]>
However I often find myself in situations where, for whatever technical, legal, or just plain stupid reason I cannot install it.
If you find yourself in similar situation, here are a few tools that might help you.
]]>
The interactive process you ran on the remote machine keeps running.
The editor you opened on the remote machine stays open. Even if you are in the middle of a cut-and-paste, when the connection is lost, you can still reconnect and you don't lose anything.
It can provide you with multiple buffers and split-windows to do more than one operation at the same time via a single ssh connection.
Here is my modest configuration file and some command I use.
]]>
The interactive process you ran on the remote machine keeps running.
The editor you opened on the remote machine stays open. Even if you are in the middle of a cut-and-paste, when the connection is lost, you can still reconnect and you don't lose anything.
It can provide you with multiple buffers and split-windows to do more than one operation at the same time via a single ssh connection.
Here is my modest configuration file and some command I use.
]]>
]]>
]]>
]]>
]]>
]]>
]]>
In these examples we see how to do that with simple functions and methods of classes.
]]>
In these examples we see how to do that with simple functions and methods of classes.
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
Naturally the commands you pass to these will also need to make sense on the specific operating system.
In this example first we use the internal echo command of Jenkins.
Then we call sh and run the echo of our Unix shell.
Then we execute the hostname command and finally the uptime command.
]]>
Naturally the commands you pass to these will also need to make sense on the specific operating system.
In this example first we use the internal echo command of Jenkins.
Then we call sh and run the echo of our Unix shell.
Then we execute the hostname command and finally the uptime command.
]]>
]]>
]]>
]]>
]]>
Some companies have a development workflow in which the only way to add to the "master" branch is to send a pull-request, get it reviewed, approved and then merged into "master". For them it might be useful to enforce that merging into master can be done only with a fast-forward merge.
]]>
Some companies have a development workflow in which the only way to add to the "master" branch is to send a pull-request, get it reviewed, approved and then merged into "master". For them it might be useful to enforce that merging into master can be done only with a fast-forward merge.
]]>
]]>
]]>
This could be done by including the issue number in every commit message. (Even if in your setting it is called ticket number or bug number.). e.g. #42.
Git provides ways to enforce that you every commit has such a string in it, but this enforcement can only be done on the server. Too late if I made several commit on the client without the required part.
You can, however, ask git on your own computer to help you enforce this rule.
]]>
This could be done by including the issue number in every commit message. (Even if in your setting it is called ticket number or bug number.). e.g. #42.
Git provides ways to enforce that you every commit has such a string in it, but this enforcement can only be done on the server. Too late if I made several commit on the client without the required part.
You can, however, ask git on your own computer to help you enforce this rule.
]]>
]]>
]]>
Groovy comes with a module called json to handle various use-cases with JSON.
]]>
Groovy comes with a module called json to handle various use-cases with JSON.
]]>
]]>
]]>
]]>
]]>
]]>
]]>
That does not give you a lot of chances to learn how others, in other companies work.
As a trainer, consultant and coach I have several clients every year. That already gives me a lot more opportunities to learn, but it is still only a handfull of companies a year.
In this series of blog posts I am going to interview Engineering leaders at various hi-tech companies. This will provide some insight into how these R&D teams work. With a focus on both the process and the human side of it.
]]>
That does not give you a lot of chances to learn how others, in other companies work.
As a trainer, consultant and coach I have several clients every year. That already gives me a lot more opportunities to learn, but it is still only a handfull of companies a year.
In this series of blog posts I am going to interview Engineering leaders at various hi-tech companies. This will provide some insight into how these R&D teams work. With a focus on both the process and the human side of it.
]]>
]]>
]]>
]]>
]]>
These are similar to other functions of the organization: Marketing, Sales, HR, Legal, Finance etc.
These days some organizations also have dedicated DevOps teams.
]]>
These are similar to other functions of the organization: Marketing, Sales, HR, Legal, Finance etc.
These days some organizations also have dedicated DevOps teams.
]]>
The idea is that it is better to fail fast then to fail slow.
It is also better to avoid further overloading the already overloaded remote system.
]]>
The idea is that it is better to fail fast then to fail slow.
It is also better to avoid further overloading the already overloaded remote system.
]]>
]]>
]]>
]]>
]]>
]]>
]]>
The first step in that direction is to see how to add JavaScript and jQuery to the pages.
]]>
The first step in that direction is to see how to add JavaScript and jQuery to the pages.
]]>
]]>
]]>
]]>
]]>
Traversing a directory tree sytarting from a specific path.
]]>
Traversing a directory tree sytarting from a specific path.
]]>
]]>
]]>
examples/data/count_digits.txt
23 34 9512341 3 34 2452345 5353 67 22 42136357013412 42 5 65 64
and count how many times each digit appears.
]]>
examples/data/count_digits.txt
23 34 9512341 3 34 2452345 5353 67 22 42136357013412 42 5 65 64
and count how many times each digit appears.
]]>
In this case I am using GroovyCSV that has its source at GitHub.
]]>
In this case I am using GroovyCSV that has its source at GitHub.
]]>
]]>
]]>
3 7 23 0 -17 98 12
This is a simple exercise in reading the content of a file.
]]>
3 7 23 0 -17 98 12
This is a simple exercise in reading the content of a file.
]]>
By default it is of type ArrayList though you can create a list of type LinkedList as well.
]]>
By default it is of type ArrayList though you can create a list of type LinkedList as well.
]]>
instanceof checks if obj is the subclass of some class.
getClass returns the exact type of an object.
]]>
instanceof checks if obj is the subclass of some class.
getClass returns the exact type of an object.
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
My primary reason for looking into it is that it is the language used for the Jenkins Pipelines.
Oh and you can also grab my Groovy book.
]]>
My primary reason for looking into it is that it is the language used for the Jenkins Pipelines.
Oh and you can also grab my Groovy book.
]]>
In some cases the best solution is to mock the random number generation and provide pre-defined fake random to the application.
This is what we are going to demonstrate here.
]]>
In some cases the best solution is to mock the random number generation and provide pre-defined fake random to the application.
This is what we are going to demonstrate here.
]]>
Unfortunately in many applications people mix these things. Especially if they have not tried to test the application.
So when you start writing tests to such an application, one that might have functions with hundreds or thousands of lines of code, you need to be able untangle the code.
In this article we'll override the input and output of a CLI (Command Line Interface) based application.
]]>
Unfortunately in many applications people mix these things. Especially if they have not tried to test the application.
So when you start writing tests to such an application, one that might have functions with hundreds or thousands of lines of code, you need to be able untangle the code.
In this article we'll override the input and output of a CLI (Command Line Interface) based application.
]]>
Every time though I have to spend some time figuring out how to lay out my files and how to load the template. So here is an example that you can also use as a skeleton for your next application.
]]>
Every time though I have to spend some time figuring out how to lay out my files and how to load the template. So here is an example that you can also use as a skeleton for your next application.
]]>
In addition the application might create files while the test is running or change some of the existing files.
We would like to be sure these changes don't interfer with the regular work of the rest of the computer and even if we run several tets in parallel that might all want to change the same file, these tests won't interfer with each other.
The best course of action for us is to use a unique temporary directory for each test function.
]]>
In addition the application might create files while the test is running or change some of the existing files.
We would like to be sure these changes don't interfer with the regular work of the rest of the computer and even if we run several tets in parallel that might all want to change the same file, these tests won't interfer with each other.
The best course of action for us is to use a unique temporary directory for each test function.
]]>
]]>
]]>
The site is going to be static from the point of view of the server, but you can include any JavaScript code and build a whole client-side application on that site.
By default GitHub provides you with a subdomain in the github.io domain, but you can also map a domain name or a hostname you own.
It is a perfect solution for software developers who want to show their work and make themselves look more attractive to prospective employers. It is also a fun way to experiment with front-end development.
]]>
The site is going to be static from the point of view of the server, but you can include any JavaScript code and build a whole client-side application on that site.
By default GitHub provides you with a subdomain in the github.io domain, but you can also map a domain name or a hostname you own.
It is a perfect solution for software developers who want to show their work and make themselves look more attractive to prospective employers. It is also a fun way to experiment with front-end development.
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
You are in one-dimensional space.
]]>
You are in one-dimensional space.
]]>
It is similar to JSON, but looks much nicer and much more readable.
It is usually used for configuration files that need more power that an INI file.
]]>
It is similar to JSON, but looks much nicer and much more readable.
It is usually used for configuration files that need more power that an INI file.
]]>
]]>
]]>
You can also buy the book: Collaborative Development using Git and GitHub.
]]>
You can also buy the book: Collaborative Development using Git and GitHub.
]]>
The Linux kernel has 20 million lines of C code and I've just compiled in in 36 minutes on an old 4-core machine. PostgreSQL has 1 million lines of code and most of the build farm machines report 8-12 minute build time.
How long does it take to compile your software?
]]>
The Linux kernel has 20 million lines of C code and I've just compiled in in 36 minutes on an old 4-core machine. PostgreSQL has 1 million lines of code and most of the build farm machines report 8-12 minute build time.
How long does it take to compile your software?
]]>
]]>
]]>
]]>
]]>
A few articles about Java:
]]>
A few articles about Java:
]]>
]]>
]]>
In most of the languages it is a bit cumbersome.
]]>
In most of the languages it is a bit cumbersome.
]]>
]]>
]]>
The same with modules from CPAN. You can use the versions that are in the package-management system of your Linux distribution, or you can install them directly from CPAN.
In this article we'll see how to use the system-perl and CPAN modules installed using apt.
]]>
The same with modules from CPAN. You can use the versions that are in the package-management system of your Linux distribution, or you can install them directly from CPAN.
In this article we'll see how to use the system-perl and CPAN modules installed using apt.
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
Ansible runs on Linux/Unix machines including Mac OSX. (There is no plan to port it to run on MS Windows.) This is the manegement machine.
It can control (manage) both Linux/Unix machines and boxes running MS Windows.
]]>
Ansible runs on Linux/Unix machines including Mac OSX. (There is no plan to port it to run on MS Windows.) This is the manegement machine.
It can control (manage) both Linux/Unix machines and boxes running MS Windows.
]]>
]]>
]]>
]]>
]]>
In order to learn how to use Ansible we also need at least 2 boxes. One that runs Ansible, the manager computer, and one that is being managed by Ansible. (If we can set up more of these, even better as then we can see how to configure different machine to do different tasks.) The ideal for some of our examples will be 4 machines.
]]>
In order to learn how to use Ansible we also need at least 2 boxes. One that runs Ansible, the manager computer, and one that is being managed by Ansible. (If we can set up more of these, even better as then we can see how to configure different machine to do different tasks.) The ideal for some of our examples will be 4 machines.
]]>
]]>
]]>
]]>
]]>
]]>
]]>
It could also run on Solaris, but who has Solaris on their notebook or desktop computer.
This method is not the simplest, but it will make it easier to understand the system and other options (e.g. Vagrant uses this process behind the scenes.
The installation and all the setup can take 1-2 hours. Much shorter when you do it for a second time.
]]>
It could also run on Solaris, but who has Solaris on their notebook or desktop computer.
This method is not the simplest, but it will make it easier to understand the system and other options (e.g. Vagrant uses this process behind the scenes.
The installation and all the setup can take 1-2 hours. Much shorter when you do it for a second time.
]]>
A few exercises that you could do to practice what we have learned during the workshop. Some will go way beyond it and make you learn a lot more about using Linux on the command line.
]]>
A few exercises that you could do to practice what we have learned during the workshop. Some will go way beyond it and make you learn a lot more about using Linux on the command line.
]]>
I assume that you already have Ansible installed on your desktop/notebook, whatever machine is in front of you. If not, check out the linked article.
]]>
I assume that you already have Ansible installed on your desktop/notebook, whatever machine is in front of you. If not, check out the linked article.
]]>
Set the file ownership rights properly.
]]>
Set the file ownership rights properly.
]]>
No agent is required on the host. You only need to install Ansible on the computer(s) from which you wish to manage your servers.
In this series we are going to look at various features of Ansible.
]]>
No agent is required on the host. You only need to install Ansible on the computer(s) from which you wish to manage your servers.
In this series we are going to look at various features of Ansible.
]]>
I am trying something new now. I'm trying to send myself an alert whenever a task is done. For this to work first I had to find a way to send a notification from the command line.
]]>
I am trying something new now. I'm trying to send myself an alert whenever a task is done. For this to work first I had to find a way to send a notification from the command line.
]]>
While I could certainly sit at that Linux machine as a desktop, I opted to use it mostly to use it as a server and ssh into it.
Now in order to experiment with multiple server setups easily I needed Vagrant and VirtualBox and I wanted to install another Ubuntu as a guest operating system.
]]>
While I could certainly sit at that Linux machine as a desktop, I opted to use it mostly to use it as a server and ssh into it.
Now in order to experiment with multiple server setups easily I needed Vagrant and VirtualBox and I wanted to install another Ubuntu as a guest operating system.
]]>
]]>
]]>
We will build an application step-by-step. Scroll down to the end of the page to see a full example with all the bells and whistles.
]]>
We will build an application step-by-step. Scroll down to the end of the page to see a full example with all the bells and whistles.
]]>
They are an excellent format to introduce your employees to a topic they are not familiar with without the burden and cost of sending them to a 3-5 days long training course. They will gain the initial push and then they can either learn by themselves or go on a full-length training course if they feel the topic warrants the investment.
This is also an excellent format to keep your employees growing and ensure they see your organization as one that is ready to invest in your employees.
]]>
They are an excellent format to introduce your employees to a topic they are not familiar with without the burden and cost of sending them to a 3-5 days long training course. They will gain the initial push and then they can either learn by themselves or go on a full-length training course if they feel the topic warrants the investment.
This is also an excellent format to keep your employees growing and ensure they see your organization as one that is ready to invest in your employees.
]]>
]]>
]]>
I meant either languages they already use, languages they'd need to learn, or they'd like to learn.
]]>
I meant either languages they already use, languages they'd need to learn, or they'd like to learn.
]]>
For other languages see the Hello World exercise.
]]>
For other languages see the Hello World exercise.
]]>
We prefer the ssh client as that's how you'd interact with a Linux machine if it was running on a server at a hosting company. The ssh clients are also more suitable to work than the VirtualBox window.
]]>
We prefer the ssh client as that's how you'd interact with a Linux machine if it was running on a server at a hosting company. The ssh clients are also more suitable to work than the VirtualBox window.
]]>
In a nutshell: Using the GPU has overhead costs. If the computation is not heavy enough, then the cost (in time) of using a GPU might be larger than the gain. On the other hand if the computation is heavy, you can see a huge improvement in speed.
]]>
In a nutshell: Using the GPU has overhead costs. If the computation is not heavy enough, then the cost (in time) of using a GPU might be larger than the gain. On the other hand if the computation is heavy, you can see a huge improvement in speed.
]]>
]]>
]]>
groups/ all.txt people/ John.txt Jane.txt maskots/ Foo.txt Bar.txt other -> maskots
All that using the Unix/Linux Shell.
]]>
groups/ all.txt people/ John.txt Jane.txt maskots/ Foo.txt Bar.txt other -> maskots
All that using the Unix/Linux Shell.
]]>
]]>
]]>
The unittest module is another standard module that provides a much more powerful way to write tests and despite its name it can be used to write integration and acceptance tests just as well as unittests.
]]>
The unittest module is another standard module that provides a much more powerful way to write tests and despite its name it can be used to write integration and acceptance tests just as well as unittests.
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
Some people still find the version control systems a burden, but with further education I think this can be improved.
In my experience open source projects had a much better track record using version control systems, but there are still many individuals who write open source code without a public version control system.
Some might not even use a version control system, though I think that's quite rare.
]]>
Some people still find the version control systems a burden, but with further education I think this can be improved.
In my experience open source projects had a much better track record using version control systems, but there are still many individuals who write open source code without a public version control system.
Some might not even use a version control system, though I think that's quite rare.
]]>
Let's see a few examples.
]]>
Let's see a few examples.
]]>
]]>
]]>
Others, actually most of the Open Source projects, don't have a dedicated project manager and QA team. They don't even have a paid team of developers. Just a few volunteers who spend their own time to work on the project they care about.
Yet there are plenty of high-quality Open Source project that provide an enormous value to their users and to the world in general.
How does that work? How do Open Source projects ensure high quality?
In this article series we are going to look at some Open Source projects and see how they do this.
]]>
Others, actually most of the Open Source projects, don't have a dedicated project manager and QA team. They don't even have a paid team of developers. Just a few volunteers who spend their own time to work on the project they care about.
Yet there are plenty of high-quality Open Source project that provide an enormous value to their users and to the world in general.
How does that work? How do Open Source projects ensure high quality?
In this article series we are going to look at some Open Source projects and see how they do this.
]]>
]]>
]]>
]]>
]]>
Let's see a few of those error messages:
]]>
Let's see a few of those error messages:
]]>
In this article we'll see some explanation on why it is good and how to do it. You'll also see information on how to do it locally and remotely.
Finally this also includes the description of the Pair Programming workshops I run.
]]>
In this article we'll see some explanation on why it is good and how to do it. You'll also see information on how to do it locally and remotely.
Finally this also includes the description of the Pair Programming workshops I run.
]]>
So instead of creating a dynamic site I opted for a static site that can be generated by a script and a few templates.
Such site can be served using Apache or Nginx, but on my development machine I don't have either of those. So I wrote a small web server serving the static files.
]]>
So instead of creating a dynamic site I opted for a static site that can be generated by a script and a few templates.
Such site can be served using Apache or Nginx, but on my development machine I don't have either of those. So I wrote a small web server serving the static files.
]]>
Probably the best way to do that is by building something. If it is an open source project it has the added benefit that you can show the results to the prospective employer.
You don't even have to build something from scratch, you can also contribute to an existing project.
But how? And do you need to be an expert or can a beginner join a project?
]]>
Probably the best way to do that is by building something. If it is an open source project it has the added benefit that you can show the results to the prospective employer.
You don't even have to build something from scratch, you can also contribute to an existing project.
But how? And do you need to be an expert or can a beginner join a project?
]]>
I already had an explanation on how to set up Vagrant with VirtualBox. I assume you already have all that set up.
]]>
I already had an explanation on how to set up Vagrant with VirtualBox. I assume you already have all that set up.
]]>
Some filters work as the map function in Perl, Python, Ruby, JavaScript and in many other languages. They allow us to apply some transformation to one or more values at once. Among many other things this can be used to change how a single value is displayed.
Other filters are similar to the grep function in Perl, which is called select in Ruby, and filter in Python and JavaScript. These filters usually apply to a list of values and return a subset of the original values. They filter out certain values using some condition.
]]>
Some filters work as the map function in Perl, Python, Ruby, JavaScript and in many other languages. They allow us to apply some transformation to one or more values at once. Among many other things this can be used to change how a single value is displayed.
Other filters are similar to the grep function in Perl, which is called select in Ruby, and filter in Python and JavaScript. These filters usually apply to a list of values and return a subset of the original values. They filter out certain values using some condition.
]]>
On this page I am collecting some concepts and links related to the subject. In time I hope this will be transformed into something usable.
]]>
On this page I am collecting some concepts and links related to the subject. In time I hope this will be transformed into something usable.
]]>
]]>
]]>
In this tutorial we will only use the packages that are supplied by Ubuntu.
]]>
In this tutorial we will only use the packages that are supplied by Ubuntu.
]]>
The interview with Job van Achterberg about Inclusive design
]]>
The interview with Job van Achterberg about Inclusive design
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
It is actually quite easy, but there is a catch.
]]>
It is actually quite easy, but there is a catch.
]]>
]]>
]]>
Printing a full stack trace can help a lot.
]]>
Printing a full stack trace can help a lot.
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
Hear him talk about the inspiration.
]]>
Hear him talk about the inspiration.
]]>
We talked about a number of project that were discussed on his show: Scrapy, passlib, hypothesis, Pyjithon, and sqlalchemy.
]]>
We talked about a number of project that were discussed on his show: Scrapy, passlib, hypothesis, Pyjithon, and sqlalchemy.
]]>
In which I've also learned what are CSS resets and heared about progressive web apps.
]]>
In which I've also learned what are CSS resets and heared about progressive web apps.
]]>
CyrinConway about being a project manager at Ruby Together and deal with Bundler and RubyGems.
]]>
CyrinConway about being a project manager at Ruby Together and deal with Bundler and RubyGems.
]]>
He also told how he got into web programming in Nigeria in the '90s.
]]>
He also told how he got into web programming in Nigeria in the '90s.
]]>
]]>
]]>
See other projects and exercises.
]]>
See other projects and exercises.
]]>
Our main subject however is GraphQL being the next big thing after SOAP and REST.
]]>
Our main subject however is GraphQL being the next big thing after SOAP and REST.
]]>
We also talked a lot about accesibility in general and accessibility of web sites in specific.
]]>
We also talked a lot about accesibility in general and accessibility of web sites in specific.
]]>
]]>
]]>
These are some notes for the presentation.
]]>
These are some notes for the presentation.
]]>
]]>
]]>
What you might not know is that those attributes are still parsed and are still part of the DOM, the Document Object Model.
That is, they are still accessible by JavaScript running in the browser.
]]>
What you might not know is that those attributes are still parsed and are still part of the DOM, the Document Object Model.
That is, they are still accessible by JavaScript running in the browser.
]]>
]]>
]]>
]]>
]]>
You can subscribe with your favorite Podcast listener via the RSS feed or via iTunes
]]>
You can subscribe with your favorite Podcast listener via the RSS feed or via iTunes
]]>
How can we fix this?
]]>
How can we fix this?
]]>
We'll just use the name CSV and mean any of these cases.
]]>
We'll just use the name CSV and mean any of these cases.
]]>
Of course. If the file is missing, it cannot be found. What's the story?
]]>
Of course. If the file is missing, it cannot be found. What's the story?
]]>
After some additional research I found the solution. Let's see it.
]]>
After some additional research I found the solution. Let's see it.
]]>
]]>
]]>
]]>
]]>
This time we'll add an editor for a record where the user must choose from a fixed list of values.
]]>
This time we'll add an editor for a record where the user must choose from a fixed list of values.
]]>
]]>
]]>
This can be especially useful when trying out objects that require complex setup you don't want to type in the console.
]]>
This can be especially useful when trying out objects that require complex setup you don't want to type in the console.
]]>
In this tutorial we will only use the packages that are supplied by Ubuntu and we will deal with a very simple Hello World application.
]]>
In this tutorial we will only use the packages that are supplied by Ubuntu and we will deal with a very simple Hello World application.
]]>
CSV is a nice and simple format to keep tabular information.
In this simple example you'll see how to let your users save data from the browser.
This solution only works in the simple case, but it could be improved to handle some of the stranger cases as well.
]]>
CSV is a nice and simple format to keep tabular information.
In this simple example you'll see how to let your users save data from the browser.
This solution only works in the simple case, but it could be improved to handle some of the stranger cases as well.
]]>
]]>
]]>
]]>
]]>
This makes it even more likely that their ideas will spread.
So I thought I'd like to help it with my little knowledge of programming, but first let's write down a few ideas.
]]>
This makes it even more likely that their ideas will spread.
So I thought I'd like to help it with my little knowledge of programming, but first let's write down a few ideas.
]]>
]]>
]]>
Unfortunately there are many people who cannot read these major languages, and even if they can, it is much easer to understand thing in their own mother tongue.
On the other hand there are many articles on Wikipedia that are available in one of the "smaller" languages, but not in English. I belive making these available in English as well would be important.
]]>
Unfortunately there are many people who cannot read these major languages, and even if they can, it is much easer to understand thing in their own mother tongue.
On the other hand there are many articles on Wikipedia that are available in one of the "smaller" languages, but not in English. I belive making these available in English as well would be important.
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
Maybe you are test-driving a drone, and there is only one drone.
]]>
Maybe you are test-driving a drone, and there is only one drone.
]]>
]]>
]]>
]]>
]]>
It can be downloading an image or some other binary file.
]]>
It can be downloading an image or some other binary file.
]]>
]]>
]]>
]]>
]]>
A long long time ago, many years before bitly and similar services came on the scene I've built a site called exitlog. It was a simple url shortener, but I have not understood the business behind it and abandoned it.
Now, as an execise, let's create a URL shortener.
]]>
A long long time ago, many years before bitly and similar services came on the scene I've built a site called exitlog. It was a simple url shortener, but I have not understood the business behind it and abandoned it.
Now, as an execise, let's create a URL shortener.
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
Given a path like /home/foo/.mozilla/cache/data.txt, one of the functions will return the filename (data.txt), the other function will return the full-path directory name (/home/foo/.mozilla/cache).
Handle also the case of c:\home\foo\.mozilla\cache\data.txt.
]]>
Given a path like /home/foo/.mozilla/cache/data.txt, one of the functions will return the filename (data.txt), the other function will return the full-path directory name (/home/foo/.mozilla/cache).
Handle also the case of c:\home\foo\.mozilla\cache\data.txt.
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
See other exercises.
]]>
See other exercises.
]]>
]]>
]]>
]]>
]]>
Every programming language has plenty of libraries handling these values properly, but we can also use them as an exercise.
]]>
Every programming language has plenty of libraries handling these values properly, but we can also use them as an exercise.
]]>
See other exercises.
]]>
See other exercises.
]]>
If we would like to use them as numbers we first need to convert them to numbers.
But which number and how?
]]>
If we would like to use them as numbers we first need to convert them to numbers.
But which number and how?
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
Similar to the other two dynamic languages, arrays in ruby can also grow and shrink as the user needs them. There is no need for special memory handling.
]]>
Similar to the other two dynamic languages, arrays in ruby can also grow and shrink as the user needs them. There is no need for special memory handling.
]]>
Actually the format is called ASN 1.
]]>
Actually the format is called ASN 1.
]]>
]]>
]]>
]]>
]]>
See other exercises.
]]>
See other exercises.
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
See other exercises
]]>
See other exercises
]]>
Unedrstanding what we have on our hand can be a bit more difficult.
Perl has a build in modules called Data::Dumper that can be used to pirnt complex data structures, for example when debugging Perl programs.
Ruby has pp, the Pretty Printer for the same purpose.
]]>
Unedrstanding what we have on our hand can be a bit more difficult.
Perl has a build in modules called Data::Dumper that can be used to pirnt complex data structures, for example when debugging Perl programs.
Ruby has pp, the Pretty Printer for the same purpose.
]]>
]]>
]]>
See other exercises
]]>
See other exercises
]]>
See other exercises
]]>
See other exercises
]]>
See other exercises.
]]>
See other exercises.
]]>
]]>
]]>
]]>
]]>
In this exercise we have a file called numbers.txt that has numbers in it. Each line is a number.
Our aim is to add the numbers and print the result.
]]>
In this exercise we have a file called numbers.txt that has numbers in it. Each line is a number.
Our aim is to add the numbers and print the result.
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
Scalars can hold a single value: a number or string.
Arrays is an ordered list of scalars.
Hashes are key-value pairs where the keys are uniques strings and the values are scalars
]]>
Scalars can hold a single value: a number or string.
Arrays is an ordered list of scalars.
Hashes are key-value pairs where the keys are uniques strings and the values are scalars
]]>
In Ruby, the open-uri modules provides this simplified interface.
]]>
In Ruby, the open-uri modules provides this simplified interface.
]]>
]]>
]]>
]]>
]]>
For example:
ruby code.rb abc.txt def.txt qqrq.txt
or like this:
ruby code.rb Hello --machine big -d -tl
The question though, how can the Ruby program know what was given on the command line?
]]>
For example:
ruby code.rb abc.txt def.txt qqrq.txt
or like this:
ruby code.rb Hello --machine big -d -tl
The question though, how can the Ruby program know what was given on the command line?
]]>
]]>
]]>
Normally when you are using the command line you type in some command. That command prints out something. You know that the command has finished by the appearance of the prompt. Then you know you can type in something new to do something else. For example:
]]>
Normally when you are using the command line you type in some command. That command prints out something. You know that the command has finished by the appearance of the prompt. Then you know you can type in something new to do something else. For example:
]]>
Or maybe I am just making up this distinction. Who knows what other means by these words?
]]>
Or maybe I am just making up this distinction. Who knows what other means by these words?
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
Here you'll find a few simple examples using AngularJS, slowly building up to become a Tutorial.
For other introductions you might want to look at the AngularJS Book by Chris Smith or the ng-book by Ari Lerner. Once you get over the first steps, reading the AngularJS API and documentation becomes quite useful.
]]>
Here you'll find a few simple examples using AngularJS, slowly building up to become a Tutorial.
For other introductions you might want to look at the AngularJS Book by Chris Smith or the ng-book by Ari Lerner. Once you get over the first steps, reading the AngularJS API and documentation becomes quite useful.
]]>
There are tons of web sites with public API that we could access, but most of them use the default CORS security setting (by not setting Access-Control-Allow-Origin) which means we can only access their API from the command line or from the server and not from the browser.
On this page you'll find a collection of web sites that provide public APIs with Access-Control-Allow-Origin enabled. You can access them to fetch data via Ajax requests.
]]>
There are tons of web sites with public API that we could access, but most of them use the default CORS security setting (by not setting Access-Control-Allow-Origin) which means we can only access their API from the command line or from the server and not from the browser.
On this page you'll find a collection of web sites that provide public APIs with Access-Control-Allow-Origin enabled. You can access them to fetch data via Ajax requests.
]]>
]]>
]]>
]]>
]]>
Don't forget to check out the other counter examples!
]]>
Don't forget to check out the other counter examples!
]]>
]]>
]]>
So I set out to create a page using AngularJS that will add two numbers.
]]>
So I set out to create a page using AngularJS that will add two numbers.
]]>
]]>
]]>
Nevertheless, I think it is an interesting exercise to collect link statistics from these issues.
Specifically, I wanted to know which hosts are featured the most in the Python Weekly.
]]>
Nevertheless, I think it is an interesting exercise to collect link statistics from these issues.
Specifically, I wanted to know which hosts are featured the most in the Python Weekly.
]]>
]]>
]]>
]]>
]]>
examples/python/iterate_on_list.py
from __future__ import print_function names = ['Foo', 'Bar', 'Zorg'] for name in names: print(name)
to see:
Foo Bar Zorg
]]>
examples/python/iterate_on_list.py
from __future__ import print_function names = ['Foo', 'Bar', 'Zorg'] for name in names: print(name)
to see:
Foo Bar Zorg
]]>
]]>
]]>
That's what we are going to do now. We are going to extract the links and let some other code collect or process them.
]]>
That's what we are going to do now. We are going to extract the links and let some other code collect or process them.
]]>
]]>
]]>
The difference I've just encountered is that urllib will return the content of a page even if the page is not found (404) while urllib2 will throw an exception.
]]>
The difference I've just encountered is that urllib will return the content of a page even if the page is not found (404) while urllib2 will throw an exception.
]]>
]]>
]]>
]]>
]]>
In this article we are going to see 2 solutions:
Then you can follow-up with a solution using iterators and another solution using generators.
]]>
In this article we are going to see 2 solutions:
Then you can follow-up with a solution using iterators and another solution using generators.
]]>
A List Comprehension, just like the plain range function, executes immediately and returns a list.
A Generator Expression, just like xrange returns an object that can be iterated over.
]]>
A List Comprehension, just like the plain range function, executes immediately and returns a list.
A Generator Expression, just like xrange returns an object that can be iterated over.
]]>
]]>
]]>
The question then, how can one write a library in JavaScript that can be used both in Node.js and in the web client.
]]>
The question then, how can one write a library in JavaScript that can be used both in Node.js and in the web client.
]]>
Let's see how is that done.
]]>
Let's see how is that done.
]]>
]]>
]]>
For the solution look at the end of the article.
]]>
For the solution look at the end of the article.
]]>
]]>
]]>
Then of course if the same template is needed more than once, it would save time if we could cache the already compiled template.
]]>
Then of course if the same template is needed more than once, it would save time if we could cache the already compiled template.
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
What do you need to become a Python programmer?
]]>
What do you need to become a Python programmer?
]]>
]]>
]]>
]]>
]]>
I've made my first steps programming on this device. I did not understand it back then, but the feeling that I can make that thing do what I want was enormous. I taught myself programming by writing a game. A very simple game.
This game turned into a career and a hobby. I am one of the lucky people who makes a living with something I really enjoy.
Programming and teaching programming.
In this series of articles I plan to show you how to build that game in a modern computing environment in the hope that you will also fall in love with it.
]]>
I've made my first steps programming on this device. I did not understand it back then, but the feeling that I can make that thing do what I want was enormous. I taught myself programming by writing a game. A very simple game.
This game turned into a career and a hobby. I am one of the lucky people who makes a living with something I really enjoy.
Programming and teaching programming.
In this series of articles I plan to show you how to build that game in a modern computing environment in the hope that you will also fall in love with it.
]]>
]]>
]]>
{{#if name}} .. {{/if}}
but you cannot write
{{#if name == 'Foo'}} .. {{/if}}
Let's create a Handlebars helper that will provide this functionality.
]]>
{{#if name}} .. {{/if}}
but you cannot write
{{#if name == 'Foo'}} .. {{/if}}
Let's create a Handlebars helper that will provide this functionality.
]]>
They allow us to create a reusable expression.
]]>
They allow us to create a reusable expression.
]]>
Then there was this example with an Ajax request returning JSON data. There too we used plain JavaScript code but that was already quite unpleasant. Let's now see how can we do the same using Handlebars.
]]>
Then there was this example with an Ajax request returning JSON data. There too we used plain JavaScript code but that was already quite unpleasant. Let's now see how can we do the same using Handlebars.
]]>
]]>
]]>
Handlebars is a templating system for JavaScript that provides help to reduce anxiety over the creation of such pages.
Let's convert the plain JavaScript example to use Handlebars.
]]>
Handlebars is a templating system for JavaScript that provides help to reduce anxiety over the creation of such pages.
Let's convert the plain JavaScript example to use Handlebars.
]]>
]]>
]]>
This time we would like to capture an event generated by the user - a click on a button - and we would like to update the HTML page when that happens.
]]>
This time we would like to capture an event generated by the user - a click on a button - and we would like to update the HTML page when that happens.
]]>
We can do better by fetching an object representing a DOM element and using the innerHTML on that DOM element to changes its content.
]]>
We can do better by fetching an object representing a DOM element and using the innerHTML on that DOM element to changes its content.
]]>
]]>
]]>
Gradient is when in an area the color gradually changes from one color to another color. In this article we'll look at linear gradient when the color changes along a straight line. We are going to fill a rectangle shape using the changing color.
]]>
Gradient is when in an area the color gradually changes from one color to another color. In this article we'll look at linear gradient when the color changes along a straight line. We are going to fill a rectangle shape using the changing color.
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
In addition to the articles, you can follow the development of the application in this repository.
Let's get started by creating a simple Flask-based application.
]]>
In addition to the articles, you can follow the development of the application in this repository.
Let's get started by creating a simple Flask-based application.
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
If we want to save a picture to a file basically we can have two options. Either we save the pixels which is called raster image, or we store instructions how to draw lines in order to generate the pixels. This is called vector image.
The advantage of vector graphics is that we can enlarge the image without loss of quality.
]]>
If we want to save a picture to a file basically we can have two options. Either we save the pixels which is called raster image, or we store instructions how to draw lines in order to generate the pixels. This is called vector image.
The advantage of vector graphics is that we can enlarge the image without loss of quality.
]]>
In JavaScript we use the function keyword for this followed by the name of the new function. Then the list of parameters in parentheses and then a block of expressions in curly braces. This is the body of the function.
]]>
In JavaScript we use the function keyword for this followed by the name of the new function. Then the list of parameters in parentheses and then a block of expressions in curly braces. This is the body of the function.
]]>
Let's start with something simple.
]]>
Let's start with something simple.
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
]]>
This is the collection of Flask articles on the Code Maven site.
]]>
This is the collection of Flask articles on the Code Maven site.
]]>
That won't be a good idea in any application that is bigger than a few lines. Let's fix that.
Instead constructing HTML within the Python script, let's use a templating system.
]]>
That won't be a good idea in any application that is bigger than a few lines. Let's fix that.
Instead constructing HTML within the Python script, let's use a templating system.
]]>
The main page has a text-form and a button. If we type something in the box and click on the button, the request will be sent to the server that will echo it back on another page.
]]>
The main page has a text-form and a button. If we type something in the box and click on the button, the request will be sent to the server that will echo it back on another page.
]]>
In this article we look at the "Hello World" of Flask also shown on the main page of the framework.
]]>
In this article we look at the "Hello World" of Flask also shown on the main page of the framework.
]]>
]]>
]]>
]]>
]]>
In general, it can fetch information from the inode table, which is not the Apple version of Node.js.
Before attempting to re-implement the ls unix command, let's see how can we fetch the details of a single file-system entry using Node.js.
]]>
In general, it can fetch information from the inode table, which is not the Apple version of Node.js.
Before attempting to re-implement the ls unix command, let's see how can we fetch the details of a single file-system entry using Node.js.
]]>
]]>
]]>
Node.js provides an easy way to access the raw data passed on the command line.
]]>
Node.js provides an easy way to access the raw data passed on the command line.
]]>
Node provides the fs library to handle file-system related operations. For example to read the content of a file.
]]>
Node provides the fs library to handle file-system related operations. For example to read the content of a file.
]]>
]]>
]]>
]]>
]]>