Select Page
CALF: C++ Actor Light Framework

CALF: C++ Actor Light Framework

Recently I found myself writing a self-contained server-based traffic management software service. This harvested traffic data from a TomTom navigation API. It then used Artificial Intelligence to “learn” from that information and decide on how to advise users. This product made it into the renowned Cape Breton Spark competition, which was a great experience. Since then the project has stalled, but I’ve decided to open-source a part of it in the hopes other people may use it in one of their future projects.

The Problem

Gathering data over a network and processing it is very asynchronous and the problem lent itself to a simple actor framework. This is a paradigm that’s commonplace in languages such as Erlang, Smalltalk, Go, and others, but I wanted to use C++. My language choice was made based mainly on wanting to hit the ground running and my previous experience in C++ would make that a lot easier. Others too, I’m sure will find themselves in that boat.

The Actor Framework

I did a little research and found the credible CAF: C++ Actor Framework project. This, for me, was overkill. It required C++14 and had a lot of baggage. More functionality typically comes at a price: often performance, more often maintainability, breaking changes, bulky prerequisites such as boost, etc. I found other platforms I could use too, such as those in the Apache foundation, but they suffered similar shortcomings, for my project at least.

CALF

So I wrote my own. I wrote the application with the actor framework in separate files to the business logic, so that I could reuse the platform for other future projects. And then I decided to open-source it. My own projects continue to benefit from the generosity of open-source developers, so this is a very small payback, for anyone who stumbles across it and finds it useful.

calf-source on github

 

Good Luck

SG

The value of data

The value of data

Every organization has data, whether they know it or not. A company’s data is their second biggest asset (staff, data, customers, other assets). Without data, how do you make decisions? How do you chose what areas to focus on, what department to grow, which customers need another visit, where your strengths and weaknesses are? Lots of firms neglect their data, leaving it to languish in old computer systems or worse still, paperwork, when they should be making it work for them. It should be updated continuously and used to generate valuable reports for management and staff.

What is joined-up data?

You’ve probably heard of the phrase joined-up thinking. Well, joined-up data is really the same thing: different departments having a free exchange of data.

An example of a system with joined-up data would be the following:

Imagine a railway company. One computer system holds the track information – lengths, junctions, stations – in a GIS database. Another system handles the scheduling. The two systems talk to each other. For example, the scheduling system can query the GIS system to find out how long a train will take to get from station A to station B and then it presents the timetable to the user.

A third system is a ticketing solution. This system uses information from the GIS systems to find out length of track and station zones, and calculate prices for journeys. All systems are joined-up.

Another example

Now consider a cleaning company. They get requests over the phone for jobs and open up a calendar to see when they’re free. They book the appointment with the client, then look up the customer in an address book application to get their address, and copy that information to the calendar so they know where to go to do the job.

When the job is done, the cleaner fills out a hand-written note, which is dropped on the completed pile when they return to the office. Office admin goes through the completed pile, and types the information into excel to create an invoice, which is printed and mailed to the client. At the end of the month, all the excel spreadsheets are totalled to do the accounts.

This is an example of a computer system with data that is not joined-up. This sounds like a bad example, but is very typical of medium sized or growing businesses. All of these systems are on a computer somewhere – the calendar, the address book, the excel invoices – so they could all be joined up: they could all be one system.

The advantages of joined-up data are manifold. Employee’s would save time copying data and so would have more time to spend creating new business. Mistakes wouldn’t be made – cleaners going to the wrong address or even worse, invoices being lost in the system. Invoicing would be quicker and so cash-flow would be better, and so on.

Then there are the fringe benefits. With everything in one joined-up system, unpaid invoices could be tracked and the user alerted on a regular basis. Customers who’s address hasn’t been visited in several months could be sent a reminder email, asking if they require a spring-clean, thus generating more business.

Systems for Data

Of course, one unified system is the ideal and are many off-the-shelf offerings for typical companies – just look at capterra or g2 to search business software by category – but a lot of organisations require customization on top of an off-the-shelf system. And some businesses may require a fully customised solution which can get expensive. A first basic step for many would be to identify those data gaps and plug them. So use custom software to bridge the gaps of functionality between off-the-shelf systems and keep the data flowing between them. This third approach is cost effective, but many software providers won’t offer this service as it’s difficult and has a charge ceiling.

I can recommend Scotia Software, based in Cape Breton, Nova Scotia for customer-facing businesses. They provide  business software systems that can handle inventory and sales with extensive reporting, provide additional customization, will install on site and provide on-going maintenance at competitive costs. I can also recommend Samson-Kenny, based on Isle Madame, Nova Scotia, who specialize in software for the fisheries industry. If you contact them, please tell them Software Guru sent you.

Automation and Reporting

Once you have a useable software solution, you’ll want to automate as much as possible. Cut down on those manual tasks that are time-consuming and prone to errors. Let the computer re-order stock when levels are low, or notify customers of new products over email. Automate as much as you can to streamline your business processes.

Then get to work on creating valuable reports to check all areas of your business and refer to them regularly. Not just the usual Profit and Loss. Financial reports are vital, but just as important are production reports, customer trends, wastage reports, and so on.

And don’t forget to back-up that valuable data regularly and verify your backups too.

Good luck

SG

How to Choose a web designer

How to Choose a web designer

You can’t run a business in the 21st Century without a website. Well, you can, but, honestly, why would you want to. Navigating the world wide web is easy, but navigating the world of procuring a website is a little more involved. Not to mention, social media, which many purport as being a must for any business.

Social Media

That’s a good a place as any to start. The value of Social Media on your business success is often over-inflated. Read that again. Yep, outspoken some will say, but it’s true. It’s in the interest of consultants and service providers to over-play the role of social media in your business as they can justify more costs. And it’s more than that, website practisioners have invested many hours in learning the social media platforms. They have to believe that has been worth it.

So how much social media engagement do you need? It totally depends on your business. If all your customers are on facebook you may want a facebook page. If they’re on reddit, you may want a subreddit. Different demographics generally coalesce on different platforms. Typically one social media platform is enough and occasionally you’ll want a stake in more than one platform.

But whatever you do, don’t view it as advertising. Yes, it is, and you can try that approach, but it’s likely to fail. People don’t like being advertised to. Instead, view it as engaging in a community. Offer advice and blog about things related to your business that will interest the community and you’ll gain followers and brand awareness. That’s what you want out of social media, because when the time comes to buy a type of product, those followers will think of you first.

Yes, this approach is time-consuming, which is why I recommend only doing it for one or two platforms. Try facebook advertising and Google Adwords if you want, that’s more expensive and less time-consuming. It’s the right fit for certain businesses and can be tested for just a few hundred dollars. But in most cases, you’ll get better results with authentic involvement in social media.

Websites

So where you might get away with none or one social media page/place, you should have a website. There’s sometimes a good excuse to do this, a business could be launching a new product, or it could be a time to freshen up their website, to pull it kicking and screaming into the 21st Century with responsive design and links to social media and SEO friendly, and all that good stuff.

The scope of web design is so large, and not always but often, a client will come to us thinking they want one thing, only to find, after we show them all the options, they really want something else.

So, you have a need for a website. How can you find a designer to help you?

Start from ground up

Dig deep and find out what the purpose is for this website. Ask yourself questions such as:

  • Who is the audience for this site?
  • What kind of visitor do you want to attract?
  • How much interaction does it need with social media?
  • How dynamic does the content need to be?
  • What is the core message you need to get across?
  • What are the must-haves for the website
  • How often will you want to update pages?
  • How many people will be uploading content?

Hopefully, the answers to these questions will naturally lead to a specification for what the website should do.

Preparation

Now you can start to flesh out copy – the content of your website – and gather high-quality images such as photography and graphic design. Some web-designers can cover this whole process, and this is the preferred approach for software guru. We will figure out what your specification is via one-to-one sessions and we’ll work with you to write the copy and source the images (typically a combination of stock photography and a custom photoshoot). Other web designers will simply add content you’ve provided on to a set of static html pages.

This is an important step. Many factors will come into play. Your budget, how many pages you need, how much spare time you can invest in photography? What equipment and technical knowledge do you have? You can’t try to fit a round peg in a square hole, so find out about the designers modus operandi and narrow down your choice to ones who will work the way you need.

Evaluation

So, how do you evaluate a web-designer? Typically, a client might start with a google search. Maybe they’ll also search in their location. It’s often desirable to have a designer near you. Especially if you intend to engage them for photography or video production work also. But it’s not mandatory. Nowadays you can work with a company remotely. You can manage meetings successfully over Skype or Zoom, and you can handle remote computing sessions with tools such as TeamViewer.

So, you review the top four or five in your google search. It’s important to not just look at the first one or two. Oftentimes, they will be the ones that have paid for SEO and advertising and they will have to recoup their costs through higher prices. As with appointing anyone to provide a service – from hiring a carpenter to a lawyer, you’re going to want to look at several to get an idea of what’s a fair price.

Always check their work. The first example is of course their own website. If that’s poorly designed, it’s difficult to imagine how they will do a better job on your project. Often there will be links to other work they have done, so check their portfolio of work and testimonials if they have any. In some cases, it might not be the quality of work that deters you. It might be a case of their style doesn’t suit. The examples of their work might all be from the book publishing industry, but you want a farming website. software guru has been lucky enough to work on a lot of varying projects and can take on small and big tasks alike, but some web designers are narrowly focussed on a industry or style, and that may not be what you’re looking for.

good luck

SG

Learning Computer Coding

Learning Computer Coding

Many people tell me that they would like to learn programming, and ask my advice on how to get started. I started programming so long ago — constructing BASIC programs on a BBC micro at primary school in the eighties — computing has obviously changed considerably since. Even the term programming is broader.

There are many different ways to introduce yourself to programming, some of which I approve of, some I would not recommend. If you’re thinking of dipping your toes into coding, which technologies you start to learn, largely depend on what programming you want to do.

I’ll try to give some general advice, based on over thirty years of programming in different languages, to help you decide if software engineering is for you. Programming can be rewarding and a lot fun. It can also be frustrating, so it’s important you have a positive initial experience. As for many new things in life, things worth learning aren’t easy, so allow yourself to struggle and fail occasionally. The good news is, now more then ever, there are a host of resources out there, when you do get stuck, which you will.

Learning for the Web

Lot’s of people will come to programming via a desire to create websites. Programming isn’t necessary for website creation nowadays. It can be sufficient to have a good grounding in computers. And I’m not talking about Facebook pages or blogs. Content Management Systems, such as WordPress  use visual tools to layout and create web content, and many themes, such as Divi by Elegant Themes are so customizable, you’ll never need to touch the code.

Youtube is a great resource for learning how to do things, and this is no exception for computing. Search for “primer” or “tutorial” and then the technology you’re interested in, and you should find many useful resources.

At some point, with web design, you are going to want to get into the code. You’ll want to add more animations, effects, or interactivity to your pages. The three most important languages for the front-end of websites are:

  • HTML (HyperText Markup Language). The code of the web, every internet page is laid out with html markup, so you’ll need a first grasp of it.
  • CSS (Cascading style sheets) Style is everything on a modern web page: from colours and fonts to the way divs (blocks) are laid out and behave when a screen resolution changes. CSS defines a complex language to style all of your HTML elements.
  • Javascript. This is a universal scripting language for code that can run on the front-end (in your browser) and perform things like animation effects, auto-update of information, form checking, and so on.

I can recommend the tutorials and reference information at ‘HTML Tutorial – W3Schools’ and suggest if you are new to the practice, you go through the tutorials on HTML, CSS, and Javascript in that order.

On the above technologies, I can also recommend the “in easy steps” series by Mike McGrath. He explains things proficiently, the material is well laid out and colourful. The use of a physical book when learning a new language can not be underestimated.

It’s much easier to browse through a book open on your desk whilst you are working on a project on your computer screen, than switch back and forth between webpages on the screen. Using websites for reference (lookup of quick information) can be very useful, but I believe, when you’re learning a new subject, it’s less distracting for your mind if you use a good book.

Additionally, a book will have gone through fastidious composition, various edits, and professional layout, prior to publication. A website you found through a Google search is more likely to have information hashed together in a hap-hazard fashion.

Having said that, it can be counter-productive to read an out-of-date book, as technology moves so fast, so always check you have the highest edition when ordering or buying books for technical use.

Back End Development

Many websites aren’t just static pages. They talk to a back-end server, which responds with page data. Most talk to a database too. The larger websites we’re all familiar with such as Google, Amazon, eBay, and so on, are distributed across many machines.

A great language to learn for back-end development and scripting is PHP. It runs half the internet and is the back-end to WordPress amongst other things. The interrelation with HTML and it’s Perl-like text-processing capabilities are what makes it so powerful as a back-end web language, but it’s also a great scripting language in its own right.

PHP is structured like C, so learning PHP, will make you familiar with many idioms common to a lot of other languages.

I can highly recommend PHP in a Nutshell (O’Reilley). The first few chapters go into the history of programming and programming in general, and act as a good primer for the subject.

If you get into databases, you’ll also need to learn their language — SQL (Structured Query Language). If this is something that appeals to you, I would recommend learning the principles of relational databases, so you can gain valuable skills of database design as well as database querying.

Formal Learning

There are so many different languages you can learn for pure software development — many specialized for different uses — that it’s impossible to pick a best first language. Despite this, there are many flame wars on the internet by ill-informed amateurs claiming otherwise. Another article on beginning coding.

When I learn a new language, I normally select it for a specific task I’m doing. But there are still so many choices that I’ll look at the trends in Computer Science and see what is popular, keeping one eye on the job market to see if the language I’m learning has a demand or not.

For learning a first language, for pure learning, it’s not so simple. I think the overriding factors for a first language are:

  • Not too difficult
  • Can run on different platforms (at least: windows, mac, linux)
  • Not too crazy or specialized that the techniques you learn won’t be applicable to other languages
  • Widely used, so there’s lots of learning resources.

When I was at school BASIC, was taught. More recently, with the popularity of SBCs (single board computers) Python seems to be the trend for education. Scratch — a visual language — has also had some traction in classrooms. For reasons I won’t go into  in this blog post, I think those are all bad choices.
frontpage

If you are interested in learning programming, from ground-up, in a comprehensive manner, one language stands apart from me. Go. It was developed by google by a team of Computer Science experts. It’s a lean, compiled, statically-typed language, which has an awesome set of tools, capabilities and documentation.

Go has a great many applications, from communications, web servers, embedded systems, simulations, number-crunching, and so on.

A colleague of mine teaches youngsters programmers using the Go language in  a ten week course in the UK . Their experience is always a positive one. They understand how the language works and have fun with it.

I helped him with the teaching material, and he’s now made it available online at gophercoders. I can highly recommend this material and this language for anyone, of any age, serious about learning programming.

Here in Nova Scotia, the province has recognized the importance of teaching programming at an early age, and I would think, the materials in Gopher Coders would be an excellent resource for this initiative.

Good luck and have fun.

SG