Monday 28 November 2016

IBM MQ Exits - Good To Knows

I recently co-created a security and message exit. The main code was written in C for a linux machine. The exit was later needed for a windows machine. Here are some of the things I learnt when migrating from a linux exit to windows and reminders to myself for the future.

- Windows exits are compiled into dlls.

 - Whilst unix machines will allow you to compile C using gcc with declarations made at will throughout the code. It is integral that all these declaration are made at the start of each function for the windows platform.

- Another key thing learnt was that whilst in many examples you may see exporting functions in windows in the following form "__declspec( dllimport )" or by declaring "C extern". Being new to security exits on windows I hadn't realised that the external functions needed to be declared in a definition file or a .def in the following format.
"EXPORTS
ExitName"

- Exits names are case sensitive.

- Whilst Security Exits are needed both on the sender and receiver channels, message exits are only required on one of the channels.

It is highly recommended that anyone creating Exits have a knowledge of both MQ and the operating system/coding language being used and takes the time to understand the implications of the code being used and the security issues that may arise.

There is a useful resource on the IBM Knowledge centre for compiling exits which can be found here:
http://www.ibm.com/support/knowledgecenter/SSFKSJ_7.5.0/com.ibm.mq.dev.doc/q028160_.htm

Monday 14 November 2016

Trello - Project Management & Collaboration

  Having in the past used various project management technologies for personal and professional projects I decided to have a quick look at ways Alastair and I and potentially anyone else who wants to join the robot car project can get involved interactively from different locations.

  In the past I had used Zenhub when playing around with code with an old university team. I decided to have another look at this tool for the robot car.

Zenhub Playing
    The first "issue" I had with this was that it was only available on firefox or chrome as an add on. Having just began life as a mac user I've been using safari more and more which has all my bookmarks, past site visits and is my current favourite browser to use.
 
   With Zenhub It is very easy to add "issues", assign people to these issues and then link these issues to code sources. This would be especially good since we will be sharing our Arduino code on github. Whilst looking at Zenhub i remembered having seen waffle in past and decided to have a look at that.
Waffle Playing
 Again this has a nice layout and is much easier to use than Zenhub. I personally believe that this integrates better and has better usability for adding comments and tagging other users.

These both work great for office based projects which you access daily on your laptop (albeit only on firefox or chrome). But for personal projects you want to be able to brainstorm throughout the day/week and this is best placed on an app as well as on the laptop.

I then started looking for project management apps. Most, such as Zoho and capterra were very bulky applications with Zoho having very comprehensive project capabilities - timeline, charts, costs etc application that would be going very over the top for what we needed.

Essentially we were looking for a simple system where I could add myself and Alastair and maybe two or three others if the "team" expands. What I eventually found was trello.

Easily adapted cards and labels
  Trello is extremely easy to use and has a lot of easy to use features such as; checklists on cards, checklist points can be made into individual cards, attachments can be easily added, users tagged in comments, deadlines set and labels can be customised a lot easier than the other sites mentioned.
Zenhub and Waffle labels are rightfully software project centric that are required more for teams to collaborate than individuals.
  What is also great is that its a mobile app that is more or less a to do list without needing a fridge whiteboard. The mobile app is "live" so when Louise and I created a "home" board and I went to do some last minute shopping she could easily update the shopping list as I walked around.


 With apps like these its little quirks that will draw a user in. I personally find this is the best for non work related projects that don't require lots of timeline and budgetary restraining and organising. It's easy to add comments, checklists and throw around ideas that would get lost in a whatsapp message/group.


Above you can see some more examples of tagging users to comments, labelling tasks and adding checklists.

I'm completely open to new ideas. so let me know if you use a different project management app? Do you agree/disagree with anything I've said?
I'd love to know your thought and/or what apps you and/or your teams use. Comment below if you have some insights. Thanks for reading

Friday 11 November 2016

Robot Car V2.0

Robot Car V2.0


  A few weeks ago, we created the first version of our new and slowly improving robot car. For version 2 we added the front wheels, the body and a relay to control both sides from a single 9v battery.

  Continuining from the back of a "beer mat" design below we continued to implement.

Initial Design
Our parts list can be found here

  The first task to do was to re-cut and bend the wheel brackets, this aluminium was to be 11.5cm in length. The width was 2cm and each needed a hole drilling to allow the gears wheel connector to poke through and allow the wheel itself to sit on it.

  Once this was achieved we drilled out the rivets attaching the two wheels together from V1.0 and attached them to the larger frame using more rivets.

********************
Lesson 1: Make sure you have measured the rivet locations correctly or you will have wonky wheels
      ********************
   At this point we wanted to be able to thread the motor wires to the upper body to attach to the relay/battery etc. To do this we drilled two holes either side of the frame and attached grommets to them before threading through the motor wires - two to a side.

********************
Lesson 2: Loose wires on a flimsy motor will easily break. SECURE them
      ********************
  As can be seen in lesson 2. The wires being loose underneath the frame caused them to turn and pull whilst manoeuvring them. This lead to the wires coming off the motors and needing urgent soldering surgery. To secure them, we have now added cable ties that attach the wires tort at the base of the motor.

  Once the wires were threaded through we attached we placed the relay on the frame on top of a piece of cardboard to reduce the chances of the relay etc. shorting out.

Ready to wire
  For V2.0 we decided we would just directly connect the motors to the relays switches as well as the battery. The wiring system we chose can be seen in the image below. We are currently researching a system diagram creator (software). Any suggestions would be greatly appreciated!


Current confusing wiring diagram - wired connectors between NC and NO


  As you can see/not see in the diagram above, red wires show positive energy flow, black wired show ground and the blue wires are just connectors. The blue boxes are motors, yellow box is battery, the centre grey circle is a wire connector and the orange box is the relay module with the grey boxes inside being each switch.

  It's quite obvious that this form of drawing diagrams is going to be quickly untenable. But we live and learn.
Tidy and Smart wiring
  This wiring allows the robot to go in a straight line. With slight moving of wires you can make the car go in a circle but I'll leave you to play to make that happen. Below is a video of the robot in motion. We move onwards.
-----------------------------------------------
In Action: