Gauteng the home of Gangsters

So, I have recently relocated to Johannesburg, which is the heart and financial hub of Gauteng province and South Africa, but it is also unfortunately the home of Gangsters. List25 lists Johannesburg as the 10th most dangerous city in the world.

You may wonder why I would move from a peaceful small town to a big crime ridden city. Well the answer is quite simple, that my business travel was taking me up to Johannesburg all the time, and I preferred to have a more settled life than flying up and down all the time. And… one of the more motivating factors, is that my girlfriend lives there.

So to get back to the point of my article. Living in Johannesburg is pretty crime ridden, and after living here for about 5 months and have already been exposed to 2 incidents of crime.

The first is that my car number plate has been cloned. So to start this story off, I had decided that I would be a good and obedient resident of Johannesburg and register for the controversial E-Toll program. It is controversial as many resident refuse to register or pay the E-Toll which have been dumped upon the Gauteng residents, which there is an on going battle to get E-Tolls scrapped and pay for the upgraded roads through another channel, perhaps an increase on the fuel levy.

After being in the new city a few months, my car license expired, so I had to either drive back 600km to my home town to pay the license fee, or register here in Johannesburg.  So I go along to the Randburg licensing department and get my new GP license registration. After a few weeks I managed to get the new license plates  made and installed. But before updating my license registration details with E-Tolls I drove up to Centurion which of course I took the  N1 and went through a couple of the E-Toll gantries. At that point I got an email from E-Tolls stating that my number plate and Etag were out of sync.  So that weekend I went along to one of the E-Toll service centers to update the registration details. On completing the registration details, I inquired about my E-Toll account balance, and I was told I had some transactions outside of the 7 day grace period, which I told them was impossible as I had only drive to Centurion which was 6 days ago, and should be inside the 7 day grace period. On closer inspection the service consultant showed me a picture of a car… When I had a look at the car, I asked her what make of car it was, and she told me it was a Nissan NP200!! Now thats not my car, my car is a Subaru Forrester, and I had the papers right there, and could show her my car parked outside. So my number plate has been cloned, and someone else is driving around Gauteng running up E-Tolls for me on my account.  The matter has been raised with JMPD and it’s just a matter of time before the offending owner is arrested.

The second incident is that I was mugged in the center of Johannesburg city after leaving one of the banks where I was working on a Friday afternoon. The traffic was very heavy as I was leaving the bank, so I decided to take an alternate route. This was probably one of the first mistakes that I made. I had my cell phone on the handfree cradle which is mounted on the dashboard. I was stopped in the traffic behind some cars, and then a kind man indicated that I had a flat tyre. At which point my country bumpkin naiveness kicked in, and I opened my window to have a look. At that moment, four arms came in through my window and I was not able to close the window.  The hands were going for my keys. At which point I started to kick at the hands. I am not sure how I manged to get my feet up to that height and kick, all I know is that is what I did.  Thank God that they did not get my keys, and then they lost interest in the keys when they saw my cellphone on the dash. They started grabbing the cellphone, and I could not fight off hands getting my keys and the cellphone. I could not stop them getting the phone, so they ran off with the phone, and I tried to chase them, but I realised that it was hopeless as they were already on the other side of the street, and if I chased them they would be able to lead me into a trap. So I got into my car and proceeded to drive home.  I have now learnt not to trust anyone on the streets, and to drive with windows closed and aircon on, and not to open the windows for anyone.

So that is my experience of the great city Johannesburg. And yes I still enjoy living in the city, and have not been put off, I guess it’s one of those things that happen. Just it also seems that Vodacom profits off mugging, as I went in to replace my handset, and the consultant said I can be thankful to the robbers that I now get to have an early upgrade. Well, no thanks at all as I am still short one cell phone which I would have had, and I have to pay in a penalty for the early upgrade.

Regarding the cloned number plate, I now have extra admin each month to make sure that E-Tolls credits me for the transactions made by the cloned number plates. At least that have been helpful enough to credit me.  I am now waiting for the offender to be arrested.

On the side note of this story, I have made great progress with my Ardunio lights project where I can control my lights through my cellphone, and I will write another blog post on that in the near future.

Thats all from me for now…

What can one do with Ardunio?

So I have recently begun playing with Ardunio circuits. If you don’t know what Ardunio is have a look at this page http://arduino.cc/en/Guide/Introduction for an introduction. Basically said it is a way one can interact with the physical world more than one can with their desktop computer.

In the first experiment I did which you can watch by going to my article here I made a small project which got some LED’s to light up when a button was pressed. The amazing thing was that the LED’s were not controlled by the button itself, but the button was an input into the program and turning the LED’s on and off were an output. What this means is that a computer program was actually controlling the way that the LED’s were lighting up, pressing the button caused the program running on the Ardunio chip to execute different instructions which caused different lights to light up.

Then the other experiment I did I did not yet managed to create a blog write up for it, but it’s on YouTube, and yes I have noticed that there is vertical syndrome on my videos. This was because I was using my cellphone to record the videos, and this will be corrected in any future recordings I do. You can view the video at this link here: http://www.youtube.com/watch?v=Vmm0aY1lNiU.

So I was thinking what are some real life applications of this kind of technology? One of the things that sprung to my mind are to control things in ones home. I had these crazy ideas flying through my mind, like locking and unlocking the door to the house. Turning on your coffee to brew in the morning, then you can wake up to the smell of the coffee brewing. Other ideas like controlling the lights in your house by turning them on and off at specified times, you could even program the lights to behave in a certain way, so that when you go on holiday your home lights still come on to make it as if you are still around.

Then a friend of mine showed me to a website called Control 4 (http://www.control4.com/) which implements controls to ones house. These systems really look fancy, and include being able to control when your fountain turns on or off. Control your CCTV camera, unlock doors, monitor when a child returns home (the child must unlock the door with their PIN code). The list of uses is endless. These are the types of projects I am thinking about, automating your home.

It brings me back to a vision I had when I was at school, that was of a huge house, or call it a mansion if you will, which had this lounge, and there was a control where when activated it would move the lounge couches to the edge of the room and uncover the pool in the middle of the room.

What ideas do you have of things you would like to automate around your home?

Crystal Reports: How to make a report with a parameter which can turn report detail on or off

A friend of mine recently asked me if I could make an example for him of a Crystal Report with a parameter to control whether the report detail is shown or hidden. So I decided that I would answer his question through this post on my blog. I decided to approach the problem by having a sub-report to display the detail data, there are also other ways to achieve the same result – this is the method which came to mind at first. When a parameter called ‘ShowDetail’ is set to ‘1’ then the sub-report will not be suppressed, and when the parameter is set to ‘0’ the sub-report will be suppressed.

For this example I have used the Microsoft Northwind database. You can download a backup of the database from this link Northwind.bak and restore it to your MSSQL database server. Restore the database with the name ‘Northwind’.  Here is the link to my Crystal Report file.

Once you have restored the database you will need to set up an ODBC connection to your database using the ODBC wizard. Make sure that the ODBC wizard is for the same platform as your Crystal Reports is for. ie if you are using a x86 version of Crystal Reports you will need to use the x86 ODBC wizard. For my example I also created a separate SQL authenticated login to the database called ‘northwind’ and assigned the ‘Northwind’ database as the default database for the user.

When using Crystal Reports I prefer to use a database ‘Command’ to select the database. Once you have added the ODBC connection in Crystal Reports one needs to select the ‘Add Command’ button under the connection.

Create the sub-report, you will see that in the example I have made the sub-report really small (you may have trouble finding it), but have allowed it to grow, this is to make sure that when it is suppressed that it does not cause the report to have big spaces between the rows.

When entering the database command for the sub-report, you will see that I have created a parameter called ‘PRM_OrderID’ which is used in the SQL where clause to filter the data. This parameter needs to be set as numeric, as if it is not numeric then it will not match when the report is linked from the main report. When viewing the main report, right click on the sub-report area and choose the option ‘Change Subreport Links…’. Here you will see how I linked up the OrderID from the main report to be carried forward and mapped to the parameter which I created in the database command. I prefer to do the data filtering using the database rather than in the report itself as I understand the performance of the report will be better.

In the main report I have added a formula for the detail row fields to control whether the field is displayed with a bold font or a regular font. To see the formula right click a field and choose ‘Format Object’ and select the ‘Font’ tab, then select the formula button on the right of the Style parameter. The formula is as follows:

IF {?ShowDetail} = ‘1’ THEN crBold ELSE crRegular

A similar formula is used to display or hide the sup-report itself. When you right click on the sub-report select ‘Format Object’ you will see that there is an option to suppress the sub-report. Click on the formula button and you’ll see that the I have entered the following formula which will suppress the sub-report and thus hide the report detail.

IF {?ShowDetail} = ‘1’ THEN FALSE ELSE TRUE

The next step of this project would be to build this report into an application and have the user select whether the report detail is to be shown through a user interface. The application would then pass the selected parameter through to the report. A future blog post could be done on how to do this in the future if there is enough interest shown in this post.

I hope that you have fun experimenting with Crystal Reports.

Boys and their toys: My first Ardunio project

Recently I have started wondering how I can expand myself in programming and software development. For a while it seems like I have not been making much progress forward. So I attended the Tech4Africa conference with a friend of mine, and one of the things I learnt about during the conference was Ardunio electronic kits.

Part of my history includes loving electronics as a child, and all that I wanted to do was to attend the technical high school where I would learn about electronics. I did really well at school, and just missed being the top student in the class. And after school I had hoped to attend Teknickon to study electronics further, however that plan was stumped when my application was rejected and they accepted me for heavy current, which I turned down as I was not interested in heavy current. So I ended up doing a BCom majoring in Infomatics. I did really well in my programming and IT classes, and eventually ended up taking a short Java programming course with VZAP after I finished my degree. And that took me into the world of being a software developer which I have been doing for the last 10 years.

Now it’s like a flood coming back to me, diving yet once again back into the world of electronic, but not just any electronics, the nice thing about the Ardunio kits is that one can write small programs which are uploaded into the micro-controller to control the behaviour of the chip.

You can program the chip to listen for buttons being pressed, and then do things like turns LEDs on when the button is pressed. And as you’ll see in the video you can change the behaviour quite easily by manipulating the program, so when the button is pressed you don’t just have the light turning on, but you can control different lights to turn on and in different patterns.

Basically the Ardunio allows one to write programs to allow a computer to interact with the outside world. I am looking forward to making more complex projects than the one seen in the video. Keep coming back here for updates, and if you have any experiences with Ardunio programming or have any questions or comments, please post away and I’ll respond.

Dynamic SQL queries within a trigger using ‘sp_executesql’

This week I was working with some triggers which had a lot of repeated queries which did exactly the same job, with the only difference is that each query inserted data into a different table. Each of the repeated queries were in an if statement to check if the location was correct and if it was the same location then the data was inserted into a location specific table.

When ever I see code that is repeated it makes my blood curl, I much perfer it when the code is simple and can be maintained easily, because who wants to come back next month, or next year and have to remember that all the queries must be updated, and whats worse what if the change is complex, then it means that each of the queries must have the same complex change made to it.

So I googled and found that there is a function is SQL called sp_executesql which can execute a sql command which is stored as a variable. So I took the original query and turned it into a string. And then concatenated the different table names, depending on the location to the end of the table name in the sql statement.

Have a look at the example code:

SELECT @locationsuffix = SUFFIX FROM LOCATIONMAP WHERE LOCATION = @location

SET @sqlcommand = ‘SELECT @content=DATA.CONTENT ‘
+ ‘FROM DATA’ + @locationsuffix + ‘ AS DATA ‘
+ ‘WHERE DATA.NAME = ”’ + @name + ””

EXECUTE sp_executesql @sqlcommand, N’@content nvarchar(31) OUTPUT’, @content = @content OUTPUT

In this example the command executes the dynamic sql which selects data out a location specific table and returns the content back to the main context do that the content which was selected can be used further.

Please leave comments or feedback for me.

 

Toastmasters, Live your legend and how to connect with anyone

In the last month I have done 3 major things in my life:
1. Joined Toastmasters
2. Signed up for the how to connect with anyone course.
3. Learning to live my legend.

Toastmasters
For a while now I have been wanting to join the Toastmasters club. I first had the desire to join the club when my uncle Hugh from Cape Town gave the best obituary I have heard at his fathers funeral. Later I learned that he was a  member of the Toastmasters club which is how he had learned public speaking. Later in 2010 after I have moved back to Pietermaritzburg from Cape Town I started showing interest in joining Toastmasters myself but never had the time to do it, and it just got left off my list. But now in 2013 I have decided to join. I have three goals that I wish to achieve by joining Toastmasters. Those are, I would like to become more confident in public speaking, and also just generally raise my confidence levels. I would also like to use it as a tool to ‘Get Out’. But get out, I mean to have a presence in the real world, as I spend a lot of my time working from my office.

How to connect with anyone 
In the middle of September I took the plunge and signed up for an online course called ‘How to connect with anyone’. The course is hosted by Scott Dinsmore from California. In this course I will be learning to literally be able to connect with anyone in a room. A big part of the problem with this is being able to know what to say to a complete stranger, so during this course we will be learning how to go about knowing what to say. Also the course focuses on seeing strangers not as strangers but rather as friends we have yet to meet. So we will see how this goes, and whether I manage to meet my goals.

Live your legend
Scott Dinsmore of ‘How to connect with anyone’ also has courses specializing in how to live your legend, and how to find your passion. So as part of the connect with anyone course I am hoping that I will be able to discover new things about myself and learn how to live my legend.

A good way to learn more about ones self is to have a blog, so I am busy in the process of reviving my blog and getting more active posts on here.

I hope that you enjoy the journey with me as I continue to post interesting articles.

 

 

Latest phone scam

Today a friend of mine, Chris, posted on Facebook with a message alerting his followers about the latest phone scam that he has heard of.

This is the message he posted:

… to all you good people out there, beware of the latest telephone scam. I just had a call from someone by the name of Jack Wilson, who claims his senior person is Ryan Wilson. They make claims that they are from Microsoft Customer Care Department. They also state that many errors have been sent from my pc. They gave me a contact number of 0218139860/2. As everything on my laptop is legitimate since it is a work notebook I do not have to be concerned about anything. Just wanted to inform you innocent people that they are now phoning you for scams. Please always get as much details as possible and share this with your colleagues.

I have a very similar scam happen to me a few years ago when I also received a call from “Microsoft” to say my computer was giving errors… Whats more is that knowing a thing or two about computers I thought that I would listen to see what they wanted to do, so I let them give me the instructions of what they needed to do in order to solve the problems on my computer. It turned out that they wanted to get remote control of my computer so that they could practically do anything on my machine. However I managed to stall their plans by delaying them on the phone, and never executed their instructions. They phoned back a few times, but then they gave up after they realised that they were not going to be able to hack into my machine.

So a word of warning to everyone out there. Be on the guard against phone scammers who claim to be from Microsoft. Don’t follow any of the instructions they give you as they may ask you to compromise the security of your pc. Rather tell them that you are not interested and hangup the phone.

Please take a look at my friend Chris’s website www.wellswebtech.com.

How to write an ebook on Business Management Software

One of my latest ideas is to write an eBook on Business Management Software.. This will be the first book that I am writing, so it’s going to be a short book which covers some of the main points of what I think Business Management Software is about, but I would really like to hear from people who are looking for business management software for them to tell me what they would like as content in the book, what topics would you like me to discuss, what pains do you currently experience with your current software which is making you look for something better?

Some of the topics I will be writing about include:

Type of business management software:

  • Accounting
  • ERP
  • Time management
  • Stock Control
  • Custom written software vs Off the shelf software

What to look for in business management software.

Winning staff over to use the software (Staff buy in)

What makes business management software successful?

Reporting, what kind of reporting would you expect to get?

Mobile? Cloud?

Please feel free to leave comments with questions or topics which you would like me to include in my book.

Thank you.

Top of the world Cover

Hi Guys,

One of the songs which has always been in my music file is “Top of the world” by the Carpenters. Though when I listen to the original I find that my version is quite different, and apart from the fact that it was originally sung by a female (Karen Carpenter) I give it a slightly different spin on it with my style of piano playing.

Then just for fun I decided to add a drum track which is a pretty straight forward track due to the fact that my keyboard does not have a big selection of drumming variations. In the future I would like to investigate a drumming machine or some software for my laptop to be able throw out a drum base line with variations.

I also recorded a pad track which helps full out the song, but I found that the song really got filled out once I added the bass into the mix.

I’m really looking forward to the song which I will do next, I havent decided which song to do yet but I am working on a couple at the moment.

Until next time.

Gods mercies new every morning – What Grace?

Lamentation 3:22-23

Because of the Lord’s great love we are not consumed, for His compassions never fail. They are new every morning; great is Your faithfulness

Got this verse in my email inbox this morning.  Its really an amazing scripture which reminds us of the mercies and grace that the Father has for us.  We were learning at church this Sunday that as a mature believer that we would know the grace the father has for us.  And its when we are able to accept the Fathers forgiveness that we being to learn to forgive ourselves, and then we can truly forgive others and live in peace and harmony with eachother…

Behold how good and how pleasant it is for the brethren to dwell together :)  I believe that Gods face shines down on His sons and daughters who are enjoying community together.

Be Blessed guys and see you around :)

In Him.