Oct
23
PBS 2 of X – Introducing HTML
Filed Under Computers & Tech, Software Development on October 23, 2015 | 4 Comments
The first baby-step we’ll take towards real programming is the Hyper-Text Markup Language, better known to us all as HTML. HTML is not a true programming language, it is instead a simpler beast known as a markup language – it adds context to text. HTML allows us to mark certain parts of a document as headings, other parts as paragraphs, and yet other parts as being emphasised etc.. Like with programming, we are conveying meaning to the computer, but the range of possible things we can ‘say’ is much smaller and simpler.
Modern best practices for web development are the result of decades of evolution. We’re going to ignore all the techniques that time and experience have shown to be mistake, and jump straight to the end of the story – modern best practice. There have also been many versions of HTML over the years, and again, we’re going to jump straight to the end of the story, and use the latest incarnation of the Hyper-Text Markup Language, HTML5.
Before we dive into the specifics, I want to take a moment to explain the larger context in which we’ll be using HTML. When HTML was originally developed, it was designed to describe both what different elements of a web page were, and, what they should look like. Experience has taught us that this is a terrible idea, so we no longer use HTML in this dual role. Instead, HTML is now just half of a duo of languages used to create a web page – the other partner being Cascading Style Sheets, or CSS. We use HTML to describe what each part of the page is, and CSS to describe how each marked up element on the page should be styled.
We’ll be moving on to CSS once we finish describing HTML. Until we get CSS, the web pages we create will look exceptional plain and frankly boring, but don’t worry, we’ll move on to CSS soon enough, and then you can really let your creative juices fly!
Oct
9
PBS 1 of X – Introduction
Filed Under Computers & Tech, Software Development on October 9, 2015 | 17 Comments
Computer programming is a very powerful skill – it literally lets you tell computers exactly what to do. Contrary to what you may believe, learning to program is not about learning any specific programming language, but about learning the principles shared by all languages. Once you grasp the fundamental principles, you can move from language to language with relative ease. In my two decades of programming I have programmed in X86 Assembler, BASIC, C, C++, Java, JavaScript, Perl, PHP, BASH, Lisp, Maple, Matlab, and more. While doing so I’ve also made use of other computer languages that are not quite programming languages, but still involved telling a computer what you mean like SQL, HTML, CSS, XML & JSON. The point I really want to drive home is that you are not a Java programmer, or a PHP programmer, or a Perl programmer – you are a programmer! The tool you happen to use most today is unlikely to be the one you use most a decade from now. 15 years ago I did 90% of my programming in Java, 10 years ago, PHP, today, Perl, next year, who knows!
In case you hadn’t guessed yet, I’m not going to pick a single computer language for this series of tutorials. I’m very deliberately going to make use of a pallet of languages, and I’m going to focus on the underlying principles, rather than the specific peculiarities of any given language.
In order to help bring everyone along, I’m also not going to go from zero to real programming in one go. The plan is to sneak up on programming in small steps – hence the title of the series. We will be using computer languages from the start, but initially, they won’t be programming languages. Also, in order to be as inclusive as possible, I’m going to avoid vendor-specific languages – that means no Apple Script, no VB Script, no Objective C, and no C# (pronounced ‘see-sharp’ BTW). Instead, I’m going to use the most universal platform of all – the world wide web. We’re going to sneak up on programming by learning to create web pages.
Sep
6
Using the hsxkpasswd
Terminal Command (Part 2 of 2)
Filed Under Security, Computers & Tech, My Projects, System Administration on September 6, 2015 | 5 Comments
This is the second part of a two-part post – read part 1 here.
In part 1 we learned how to use the command line too hsxkpasswd
to generate passwords, and how to use various flags to specify custom password generation configurations, and word sources. In this second part we’ll look at how to save these customisations for future use with .hsxkpasswdrc
files.
Aug
22
Using the hsxkpasswd
Terminal Command (Part 1 of 2)
Filed Under Computers & Tech, System Administration, My Projects, Security on August 22, 2015 | 8 Comments
Since version 3.5, the Crypt::HSXKPasswd
password generating perl module ships with a command line interface to the password generator called hsxkpasswd
. This provides a way for non-Perl programers to access the vast majority of the module’s functionality.
The easiest way to install the module, and it’s accompanying terminal command is via CPAN:
sudo cpan Crypt::HSXKPasswd
Once the module is installed, you’ll have access to the hsxkpasswd
terminal command.
Getting started is simple, run the command with no arguments at all and it will generate one password using the default settings:
bart-iMac2013:~ bart$ hsxkpasswd @@26.MEASURE.below.LIFT.95@@ bart-iMac2013:~ bart$
If you want more passwords, pass a number as an argument, and you’ll get that many passwords:
bart-iMac2013:~ bart$ hsxkpasswd 10 ~~08!hole!VOWEL!then!45~~ $$49^monday^YELLOW^remember^22$$ //69-express-MONDAY-edge-54// --42~KITCHEN~save~COLD~40-- ==51%REPLY%even%AUGUST%28== %%63&list&INSIDE&train&58%% ^^19!spain!CONGO!spain!01^^ ::30@SMILED@from@PERIOD@90:: &&05%decimal%THREE%remember%80&& ..47^ROAD^dress^BERLIN^11.. bart-iMac2013:~ bart$
Aug
11
Crypt::HSXKPasswd
and hsxkpasswd
now on CPAN
Filed Under My Projects, Security, Software Development, Computers & Tech on August 11, 2015 | 1 Comment
The latest stable release of both the Crypt::HSXKPasswd
perl module, and the hsxkpassd
terminal command are now available through CPAN: http://search.cpan.org/perldoc?Crypt%3A%3AHSXKPasswd
The library and terminal command are bundled together, and can be installed onto Unix/Linux/Mac OS X computers in the standard CPAN way:
sudo cpan Crypt::HSXKPasswd
When this install finishes, both the terminal command and perl module will be available for use on the system, along with the documentation for both:
man hsxkpasswd perldoc Crypt::HSXKPasswd
Even though I’ve put a lot of time an effort into creating these tools, I’ve chosen to released them entirely free of charge, and with a very liberal open-source license (BSD). If you find either the terminal command or Perl module useful, please consider making a donation below to help cover my time and costs.
If you find a bug, would like to suggest a change or improvement, or would like to contribute code to the project, please use the project’s GitHub page.
Aug
8
JSON – a quick intro
Filed Under Computers & Tech, Software Development on August 8, 2015 | 6 Comments
The letters JSON stand for JavaScript Object Notation, but that doesn’t really help you understand what it is, and what it’s for. JSON may have it’s origins in JavaScript, but it’s moved on from there. JSON has become a very popular human-readable plain-text format for sending structured data between applications.
In short, JS is a way of representing data that both computers and humans can read and understand. Think of it as XML’s younger better looking cousin 🙂
Note that this article is intended to be a JSON primer, not an exhaustive description of the format.
Aug
8
Uninstalling a Crypt::HSXKPasswd
Beta
Filed Under Computers & Tech, My Projects, System Administration on | 2 Comments
Firstly, thanks to everyone who runs beta versions of Crypt::HSXKPasswd
– every bug you find makes the software that little bit better!
However, now that the software is in CPAN, many of you may well want to move away from the stand-alone beta releases, and start getting the module directly from CPAN. Before you install the module from CPAN, you should remove the beta from your system. You can do that in two easy steps:
- Install
pm-uninstall
from CPAN:sudo cpan App::pmuninstall
- Use
pm-uninstall
to remove the beta version ofCrypt::HSXKPasswd
:sudo pm-uninstall Crypt::HSXKPasswd
Jul
19
Announcing Crypt::HSXKPasswd
Beta 4
Filed Under Computers & Tech, Software Development, Security on July 19, 2015 | Leave a Comment
Another week, another beta release of Crypt::HSXKPasswd
. The fact that the betas are now coming quick and fast is indeed a sign that this code is getting very close to ready for a full release.
This latest series of changes came about because when I started work on a tutorial for using the command line app I realised some changes were needed to give a better user experience.
The headline changes are that you can now specify a dictionary file rather than a dictionary package name if you prefer, you can now specify arguments for the dictionary and RNG packages, and the file format for hsxkpasswdrc
files has been updated to match these changes.
Finally, I’m still looking for help in the following areas:
- Native German, French, Italian, Spanish, Dutch, and Portuguese speakers to sanitise the dictionary files for those languages, leaving only a few thousand common words – these dictionary files are simply too big at the moment, and they must be full of really obscure words to be this large!
- People who are good at technical writing to help me give the documentation some spit and polish. I think all the relevant information is there, and I have run it all though a spell checker, but it could definitely do with some TLC from a copy editor!
Oh, and finally finally, if you find this module useful, please consider donating with the button below – I have literally put hundreds of hours into this code in the last few months, and given it all away for free.
*Download Beta 4 of Crypt::HSXKPasswd
via GitHub*
Jul
13
Announcing Crypt::HSXKPasswd
Beta 3
Filed Under Computers & Tech, Software Development, Security on July 13, 2015 | Leave a Comment
I’ve just released what I hope will be the last beta release before the first stable release of Crypt::HSXKPasswd
. This release has some bug fixes, but is mostly focused on improvements, especially to the new command line interface.
Initially I had planned to make the previous beta the last one before the first stable release, but then I realised that the command line interface really does need support for a configuration file before it’s ready for prime-time, so this beta is focused around the addition of what I am calling hsxkpasswdrc
files.
hsxkpasswdrc
files allow custom presets to be stored for re-use, and for defaults to be set for many of the command line options, making it much easier to customise the command line interface’s behaviour.
By default the command line interface now looks for a hsxkpasswdrc
file at ~/.hsxkpasswdrc
. You can specify a different path with the new --rcfile
option, and you can use the new --test-rcfile
option to help you debug your hsxkpasswdrc
files.
If you have an interest in this module, please install the beta and report any problems you find by opening issues on the project’s GitHub page. Or better still if you’re a developer, fixing the bug and sending me a pull request 🙂
Finally, I’m still looking for help in the following areas:
- Native German, French, Italian, Spanish, Dutch, and Portuguese speakers to sanitise the dictionary files for those languages, leaving only a few thousand common words – these dictionary files are simply too big at the moment, and they must be full of really obscure words to be this large!
- People who are good at technical writing to help me give the documentation some spit and polish. I think all the relevant information is there, and I have run it all though a spell checker, but it could definitely do with some TLC from a copy editor!
Oh, and finally finally, if you find this module useful, please consider donating with the button below – I have literally put hundreds of hours into this code in the last few months, and given it all away for free.
*Download Beta 3 of Crypt::HSXKPasswd
via GitHub*
Jul
5
TTT Part 35 of n – HTTP Commands
Filed Under System Administration, Computers & Tech on July 5, 2015 | 6 Comments
The previous instalment we introduced the HTTP protocol. In this instalment we’ll look at three terminal commands which make use of the HTTP protocol.
We’ll start by browsing from the terminal, and then move on to a pair of very similar commands for making HTTP requests from the terminal. These two commands can do many things, but we’ll focus on two specific use-cases, downloading files, and viewing HTTP headers.