<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Shane Hamilton</title>
    <description>The latest articles on DEV Community by Shane Hamilton (@lshanel).</description>
    <link>https://dev.to/lshanel</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1075467%2Fd937a447-20dc-4526-a91b-2a34058800df.jpeg</url>
      <title>DEV Community: Shane Hamilton</title>
      <link>https://dev.to/lshanel</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/lshanel"/>
    <language>en</language>
    <item>
      <title>Beatspeak DevBlog 3 Computer Vision + Telehealth = passion project</title>
      <dc:creator>Shane Hamilton</dc:creator>
      <pubDate>Mon, 08 May 2023 18:49:05 +0000</pubDate>
      <link>https://dev.to/lshanel/beatspeak-devblog-3-computer-vision-telehealth-passion-project-2k1c</link>
      <guid>https://dev.to/lshanel/beatspeak-devblog-3-computer-vision-telehealth-passion-project-2k1c</guid>
      <description>&lt;p&gt;In my last post I left the story after finishing the accelerator program. I had ultimately failed in my primary goals of:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Building a team and startup&lt;/li&gt;
&lt;li&gt;Raising money to bring the product to market&lt;/li&gt;
&lt;li&gt;Building the product to a production standard&lt;/li&gt;
&lt;li&gt;Having the Idea and product and in a state suitable to bring into a larger company&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The aim of the system was to automate a crucial task for nurses, in truth I did have the option of bringing it to a large american multinational which had a program for such ideas. In the end however I decided not to for a number of reasons. &lt;/p&gt;

&lt;p&gt;The first reason was it would take 5 years and I would basically be an employee with no control over the direction of the project, the second reason was it was clear it would be used mainly for private healthcare users and not be targeted at public health or the people with no access to medical care, basically it would be a premium product. &lt;/p&gt;

&lt;p&gt;There was also interest from security and surveillance companies but I really had no interest in this area it just went totally against all my values and principles. My culture and heritage just makes it impossible to work on any product designed for the security or surveillance industries.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Post accelerator&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;At this stage the funding and the monthly stipend came to an end, I was years away from generating any revenue and if I sold the idea into a large company I would lose control and the project would never reach the potential I saw for it. I had been freelancing and taking on projects (mostly hardware) during the program to augment my income, but this was not nearly regular even to cover my rent and living costs. &lt;/p&gt;

&lt;p&gt;I decided I needed to take a job in software development, first to pay my bills and second I needed some hands on professional experience in pure software. At this stage I was in the late phase of tendering for a project with the European Space Agency. The project was nothing to do with my main project and was instead on the topic of using Software defined radios with Cloud providers to offer powerful real time satellite signal processing. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Engineer for hire&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I won the project and funding with my plan to use off the shelve raspberry pi's, software defined radios and AWS to demonstrate how a video could be converted to a satellite signal. Then transmitted via radio waves and decoded in real time (with a slight delay). To take this project I wasn't able to do so as an individual so I pitched it to another company based in Dublin and they agreed to host me for the 6 months. &lt;/p&gt;

&lt;p&gt;During my time on this project I was successful in building the system which used AWS with kubernetes(something the company wanted to experiment with) Apache Kafka and a lot of C++. I was also successful in winning the company two further contracts with the ESA, but after the 6 months I left. In this time I wasn't able to work on the heart rate app. I did learn a lot about cloud, dev ops and signal processing at scale but I was finding my lack of progress on Beatspeak very frustrating. I was also struggling financially, I was barely able to afford my small apartment and I was barely able to make ends meet. During this period I walked to avoid paying for the bus, I ate one meal a day and I just didn't socialise outside sport to save money. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Dream come through&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;At the end of the six months I won a place on an internship with bell labs. I had always dreamed of working in the famous labs, I had read so much about them, even thought I was way over qualified for the program I got onto (it was designed for graduating and recently graduated college students) I was really excited to start.&lt;/p&gt;

&lt;p&gt;I really enjoyed my time in the labs there were so many diverse projects to work on and the conversations at lunch time were some of the best I've ever had at work. I did struggle however, the salary was barely better than before and at this stage I was forced to move back in with my parents to afford a car to get to the office. I struggled with the 9 to 5 schedule which I hadn't done for a few years and its really hard to hide the symptoms of my ADHD in an open plan office. In the end I left after 6 months with a lot of new experience. I had tried to bring the heart rate project into the organisation and I tried to get help and insight but ultimately it wasn't a good fit. The labs at this stage had a model of filing patents or working with industry but this were done by individuals with PhD's not individuals like me who simply built what we were told.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Professional Developer&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Following my time in Bell Labs, I had built up a lot of development experience at this point both professionally and on side projects. I was comfortable with web, mobile, desktop and embedded development. I managed to land a job as a c++ developer in a robotics startup. They had a product that they build custom from the ground up from the robot to the software controlling it. This was mainly C and C++ with a central server to control up to 50 robots in a room together.&lt;/p&gt;

&lt;p&gt;When  I joined I was team member number 6. On my first day one engineer quit and joined Google, this became a trend. He had spent six months writing a software package, that was not tested or integrated so I had to take this and do both asap. I had to get up to speed with the system that had 6 components each with at least 20k lines of hand written code. The code was written by multiple generations of engineers and was a soup of different style and opinions, it was separated into 6 parts but each part worked with each other part, aka integration hell. Documentation was non existent and comments were incredibly rare and often wrong. &lt;/p&gt;

&lt;p&gt;This was really a baptism by fire, I spent two years at the company and each time I would get on top of a piece of software another engineer would leave and Id have to take over his section. I ended up building a whole CI/CD pipeline that tested and deployed the software using github actions, and ansible I had to do a crash course on the job on Dev Ops. I was the most junior engineer by far when I started, no new team member every joined, some would start for a day or two but look at the code and leave. Eventually all the seniors left over conflict with management. My final task was to black box all the code and make it available to python developers who the company decided to hire instead of C++ developers as they were easier to find and less demanding than c++ developers. &lt;/p&gt;

&lt;p&gt;I learned a lot from this job, it was also during the covid 19 lock downs so it was my sole focus for a while, in the end a lot of my experience was of how not to do things and what to do if your forced to work with unmanageable code you can't change. &lt;/p&gt;

&lt;p&gt;Towards the end of my time in the job when I was burning out I was finally able to refactor and rewrite the code because I was the last engineer left. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--6Lxixa0E--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zg22xubxgk4z0qvgvsum.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--6Lxixa0E--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zg22xubxgk4z0qvgvsum.gif" alt="Image description" width="400" height="267"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I cut most of the 20k+ components down to 5k with no loss in function, performance or redundancy and often with an improvement each. This was a period I really got into functional programming especially with c++. The bloated unmanageable code was clearly a result of a dogmatic adherence to Object Orientated principles with layers upon layers of inheritance. Often wheels where reinvented again and again as components that where written to be reused "with no documentation" where simply re-implemented elsewhere in the code by a different engineer with no knowledge or interest in using preexisting code. Sometime a component would be designed and implemented with a simple function but Kafkaesque layers of complexity to make it "reusable", "extendable" or "scalable" of course the complexity became so great nothing could be reused or even modified.&lt;/p&gt;

&lt;p&gt;The other thing I learned on this job is no amount of software management fads, or buzzwords can make up for poor design, poor code or the ballooning tech dept caused by both. As the code continued to cause serious problems for the company as it was on fire metaphorically and for one scary moment actually on fire! It was during covid so I just worked long long hours on it, I was basically working on it when I wasn't sleeping and sometimes when I was. &lt;/p&gt;

&lt;p&gt;In this job I came to the conclusion a developer is basically fighting against complexity as they try to add features and stability to the system. I think this is ultimately what Functional and OOP are trying to achieve to simplify the code so any engineer can consistently work on and improve the code and avoid the spinning plates frustration of spaghetti code.&lt;/p&gt;

&lt;p&gt;I saw how a dogmatic believe in the inherent goodness of all things OOP could blind developers to the reality of needing a well designed and robust code base regardless of how.&lt;/p&gt;

&lt;p&gt;Functional programming seemed a silver bullet for this complexity when I first started using it. A lot of proponents of Functional will present the issues I came across as something only applicable to OOP, Functional is definitely more terse and easy to use when It works, but it also has the limitation of having to constantly move the real world of side effects into the stateless world of functional. I think this might work OK in web development but when interfacing with the real world and hardware it had its limits. Even when it was suitable a lot of my time had to be spend in writing the code to support the actual code I wanted to run. I think this is a lot less of a problem if I was better at functional programming but it felt like I was already off the main road and the deep I went on the topic it felts like I was making my own path. I think a lot of developers like this feeling but for me I just want something fast and reliable to write. &lt;/p&gt;

&lt;p&gt;In the end I found a nice medium, I used a flat OOP structure which encapsulated the code into section where I used functional, oop, generic or imperative where it made sense. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Journeyman&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Following my time on this project I was really burnt out. I had however been able to apply a lot of what I was learning into Beatspeak, this didn't impact the functionality but I was able to refactor the code and do a rewrite with a good structure using CMake and conan. A lot of the real engineering behind the project was done in this period. &lt;/p&gt;

&lt;p&gt;After this job I landed a job with a big data, ai company. I had the freedom to choose the language and technologies I wanted. The project was to build a transcription service to run on a service but to avoid using API's for security reasons as the software was designed for governments.&lt;/p&gt;

&lt;p&gt;I decided to use Haskell as the main language that integrated it with C scripts. The C code basically used FFMPEG and opensource transcription libraries, the haskell took the audio broke it down, ran the C in parallel on the chunks and then recombined it. For usability It was all run in a docker container, so a user just had to spin the docker image up and then they had access to the onsite API. It was lightweight, robust and powerful. This job came with a really good benefit I could work fully remote from anywhere in the EU. I choose to move to Krakow because it had the lowest cost of living mixed with the nicest apartments, my intention was to save money and visit the rest of Europe from this city. &lt;/p&gt;

&lt;p&gt;This was the first time in my life I could afford to live alone in relative comfort, the apartment I rented had three rooms which was a palace compared to the places I lived while in Dublin. The other benefit of being there was there was no distractions, I could focus on work and study. In my first few months I spent all my free time building a web app for a friends startup but once I left that project I finally had the time to focus on my own projects.&lt;/p&gt;

&lt;p&gt;I really got into AI, deep learning and Machine translation, I built a few translations models for Geailge using 5 million sentence pairs and learned how to write perl I also got into Rust, Erland and Elixir. &lt;/p&gt;

&lt;p&gt;I vividly remember sitting in a cafe staring at the Beatspeak code and not knowing where to start. I had been using Emacs as my IDE for it so the first thing I did was switch to vscode, I know use a mix of nvim and vscode depending on if I need a vscode plugin. &lt;/p&gt;

&lt;p&gt;During this period I dived deep into category theory, the latest C++ features and really advanced and abstract coding concepts. I was also studying languages and linguistics on the side which really boosted my coding ability, the final improvement from this period is I learned to touch type which turn out to be a cure for my dyslexia it was like taking training weights off a really exhilarating time in my life. &lt;/p&gt;

&lt;p&gt;The job was a dream job in many ways but two extreme events led to me leaving the job 8 months later and moving to Istanbul for a summer. But that's a story for the next post.&lt;/p&gt;

</description>
      <category>cpp</category>
      <category>devjournal</category>
      <category>opensource</category>
      <category>computervision</category>
    </item>
    <item>
      <title>Beatspeak DevBlog 2 Computer Vision + Telehealth = passion project</title>
      <dc:creator>Shane Hamilton</dc:creator>
      <pubDate>Sat, 06 May 2023 17:57:35 +0000</pubDate>
      <link>https://dev.to/lshanel/beatspeak-devblog-2-computer-vision-telehealth-passion-project-4805</link>
      <guid>https://dev.to/lshanel/beatspeak-devblog-2-computer-vision-telehealth-passion-project-4805</guid>
      <description>&lt;p&gt;In my last entry I went through the origin for the idea behind the system I'm building. The aim of the system is to provide a free to use application for smartphones that can give a user a base line on their health and flag potential risk. Its based on the idea that prevention is the best treatment. The project is admittedly a moonshot but I think trying to build something to help the billions of people who don't have access to any healthcare is worth sinking my free time into regardless of the slim chances of success, I think the key is to make the attempt fun and interesting regardless of the outcome. The project is also opensource, right now that just means its available to all on my github(I cant image its much use to most in its current state) but i hope to clean it up and make it more universally available via api's and documentation once the code reaches a mature enough state. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;My Plan&lt;/strong&gt;&lt;br&gt;
In the last post I made I left the story as I was just starting on a state run accelerator program for entrepreneurship. The idea I had pitched was to automate the task of measuring patients heart rates in hospitals while they stay in intensive care generally overnight. In Ireland this is currently done by nurses, they manually take the pulse, enter the values into a formula that gives an estimate for the risk to the patient. Currently this is done on pen and paper and nurses who often works incredibly long shifts (due to a staff shortage in the country) typically will be responsible for 8 patients. Besides the long shifts and the nature of manual calculations on paper being hard to avoid small errors; the nurses I interviewed said they often had all their attention on one or two patients who were really struggling. The measurement was suppose to be taken every hour but this could be missed for all kinds of reasons.&lt;/p&gt;

&lt;p&gt;My assumption and value proposition was that if I could provide a low cost device that provided an accurate heart rate, and then If i could get this medically certified and complaint (with all the regulations) I could automate this task, give the overworked staff some peace of mind knowing all the patients are being monitored and allow them to focus on what is important. I knew going into it, this would be a massive task, it would take at least 5 years for certification alone. I had 6 months in the program to focus on the problem before I had to return to work. My aim was to use this time to prove the business case and more importantly to prove the technology. &lt;/p&gt;

&lt;p&gt;Realistically I would need to partner or sell the idea into a much larger and established company and to do this the technology would need to be very mature for anyone to invest in the certification process. Any partner would also require some patent protection to justify the upfront cost of the trials needed for certification. So this was a very very ambitious undertaking on my part. My decision to undertake it wast based on ego or ignorance but more the thought it was immoral not to try. &lt;/p&gt;

&lt;p&gt;I also had more selfish reasons. I knew that spending 6 months focusing all my time and energy on this project would really push me to the next level in my development skills both in business and tech.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Living Conditions&lt;/strong&gt;&lt;br&gt;
So with this plan I got started, I attended everything on offer and I spent all my free time coding. At the time I was in a tiny apartment in Dublin, this apartment was actually just a room that was converted, it had a single room with the cooker, bathroom and desk all together, I cannot stress how small this place was. When I was cooking I had to move the bed in front of the door. The place had no internet and it had a coin operated electricity meter. Hot water and heating was a distant memory and I could hear everything my neighbours did. &lt;/p&gt;

&lt;p&gt;It was all I could afford at the time and I was happy I found it. I took as many opportunities as I could  to get out of the room, I worked in coffee shops or parks. In Dublin then as now there was/is no place to go after 8pm. Most coffee shops close after 4pm and the rest by 8pm. I tried working in pubs but this proved impossible its just not culturally acceptable here to work on a laptop in a bar alone, people take it as an invitation to talk or worse as a source of entertainment to mock. TBF most people go to bars to relax and escape work so they don't need a reminder. Other issue was public transport, which mostly stops in Dublin at 11pm so I often found myself walking home after meetups or networking events through less than safe areas. &lt;/p&gt;

&lt;p&gt;The point of talking about all this isn't to generate sympathy or give excuses, I just want to give the backdrop and setting and then to tell you this was one of the best and happiest times of my life. The stimulation, elation and joy of working on a project I was passionate about was incredible and having the freedom to think past the next few days and into the future was incredible. Up to this point I was living day to day barely able to think past tomorrow. This period in my life really proved to me that when you work on something you truly care about and you can do so sustainably you will be happy regardless of the conditions (again provided they are sustainable both from a health and financial point of view).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Accelerator&lt;/strong&gt;&lt;br&gt;
The accelerator was incredibly challenging, It was so clear to me I had an opportunity but I would only get out what I put in. On the business side I had to do a crash course on starting and building a business, I needed to submit a business plan by the end of the program and I needed to create a pitch deck and practice pitching it weekly in front of different crowds. &lt;/p&gt;

&lt;p&gt;For someone like me with no background in business or finance this was a challenge I also needed to get up to speed fast with sales and marketing. Most of the other participants were a team with people focusing solely on their area of expertise. The other challenge I had to get over was speaking in front of people and also being grilled by experts in front of a crowd on a business plan I was trying to pull together. I always had a fear of public speaking, a heavy accent mixed with really rapid speech lead to a lot of embarrassing moments growing up with nobody understanding me, this was something I had to overcome quickly.&lt;/p&gt;

&lt;p&gt;Some things were easier than other, I could binge for a few days on topics like sales or marketing. I could take out of these topics what I needed to write my business plan and ignore anything that wasn't relative to me. &lt;/p&gt;

&lt;p&gt;Other topics and areas were harder for example public speaking. I had to practice daily my elocution and speaking slowly and loudly, I then had to get over my fears and ignore the feeling my heart was going to beat out of my chest when I stood in front of a crowd. The third aspect I needed to work on was I needed to learn to think quickly on my feat and answer questions slowly, the final aspect was i needed to add some humour and a bit of theatrics into my pitches. I had a rough start with this but by the end of the program it all came together. I know consider speaking in front of crowds a strength I have.&lt;/p&gt;

&lt;p&gt;In parallel to public speaking I needed to build up the business case, this required talking to a lot of people, reading a lot and watching a lot of content. One thing I came to realise is everyone had an opinion and they rarely overlapped, the other thing I quickly realised at least in my society is if you suggest doing something people will queue to explain why it won't work. Its a hard balance to get right but you need to be taking in feedback but equally having confidence in the idea and expressing that confidence to stop people throwing out ill formed criticisms, you also need to present the information in a way that stops a lot of question about problems you have solved or assumptions you have already tested. &lt;/p&gt;

&lt;p&gt;The final part of the business side is, for startups at least you need to build a team nobody invests in a single founder its way too risky. This was ultimately something I failed on but it wasn't from a lack of trying. &lt;/p&gt;

&lt;p&gt;One of the main issues was that so much of my network and often the most talented people I grew up with had emigrated due to the rent crisis, lack of opportunities and tbh a culture that has a lot of suspicion and discomfort with the new generation that grew up in free education and with access to the internet. There is also a culture and tradition in Ireland of leaving, its said people here vote with their feet and leave, the narrative is that there is nothing here for young people mixed with a narrative that if you never left and proved yourself you must not be any good. &lt;/p&gt;

&lt;p&gt;This is pretty common in a lot of post colonial societies its a general inferiority complex and in Ireland its mixed with a small economy, small resources and a small population in comparison to other places in the world.&lt;/p&gt;

&lt;p&gt;To find a co-founder and a potential team I started attending as many meetups as I could, I joined a lot of organisations like the World Economics Forum Global Shapers, the Youth Council of Ireland etc... There wasn't all that much to explore in Dublin so when I ran out of places to try I started my own groups or took over existing groups, so I took over Ireland's biggest functional programming group for a while and I even started a 5 a side soccer team. This was a process I started in the accelerator and that continues to this day. I haven't fully figure it out but I realised its part of a bigger global problem and that is how to build a community. I will probably post about this at some point in the future but I think its the core to being successful at anything in life. &lt;/p&gt;

&lt;p&gt;On the business side of the program I was very successful in the business plan but failed totally to build a team in 6 months, this basically meant raising money was impossible and I would have to bring the idea to an established company.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Building the system&lt;/strong&gt;&lt;br&gt;
To bring the system to a company it needed to be very mature, to me this clearly meant taking my prototype that was written in python and held together with wishful thinking (the code was terrible and not even its author could love it) and turning it into a robust scalible system.&lt;/p&gt;

&lt;p&gt;The real time requirement of the system meant I needed to use multiple treads and this ran me straight into the limitations of Python. I believe it is possible to write python code to run in parallel across multiple processes but at this point I was running into the limitations of the language everywhere. I wasn't using types so finding bugs was increasingly hard, it wasn't compiled so everything I ran the code I was afraid the fan on my laptop would take off. I was using the python version of OpenCV, using opencv comes with its own frustrations but I wanted to switch to its native language to avoid the type conversion bugs. &lt;/p&gt;

&lt;p&gt;C++ was the logical choice, it was the language OpenCV was written in which did 90% of the work of the system. It was compiled so I could building it for mobile which was a very attractive option. It was a lot more efficient which meant lower server costs if I went the API route. The greater power meant I could do more with less resources which is what I wanted. &lt;/p&gt;

&lt;p&gt;I also had a lot of personal bias, I had written a lot of JS and python but I always preferred C, I also had recently really gotten into Object Orientated Programming and I boarded the hype train with all the enthusiasm i had. I really like the similarities with biology in OOP and more than that I was so tired of the spaghetti code I was writing when my project grew so having a robust framework to organise my code was very exciting. I was really craving structure at this point. &lt;/p&gt;

&lt;p&gt;Looking back aiming to go from an imperative programmer who used python; to building something this complex with something as complicated as C++ using a new coding framework in 6 months was very naive even before you consider all the other commitments I had. In truth I did it because i had to do it. &lt;/p&gt;

&lt;p&gt;I started the with the c++ the first week of the program, the frustrations were ever constant from the start of the program to the end. In the six months of the program I threw all the code out and started from scratch numerous times. It was only in the last weeks of the program I was actually matching the accuracy of the prototype. This was definitely not the best way to learn a language or even a good way. I learned through sheer brute force and ignorance. &lt;/p&gt;

&lt;p&gt;Looking back now it all seems so obvious but I think I was able to pick up so many skills and abilities after the program in c++ based on this early experience and frustrations. For example when I later came across functional  and generic programming I immediately saw the benefits over OOP, and vice versa I saw when OOP was better. I later came across Cmake, and Valgrind and Conan and was able to quickly add them to my toolset because I could excitedly binge on learning them to overcome the frustrations I ran into in the first 6 months of the project.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Outcome of the Program&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When I left the program I had a business plan, a pitch deck and a robust system in C++. Unfortunately I didn't have any more funding, I didn't have a team and the system I built was solid but not nearly mature enough for certification. Overall I learned a lot  but I wasn't successful in achieving what I set out to do. I think my goals where achievable and I could probably achieve them with a second try but I underestimated the challenge at the time and over estimated my abilities. &lt;/p&gt;

&lt;p&gt;One surprise outcome was that I won a local start up competition with my idea, winning the best young entrepreneur in my region of Ireland, this was a massive confidence boost.&lt;/p&gt;

&lt;p&gt;After the program I realised I really needed to get some experience as a pure programmer in the tech industry. I took a job first in the famous Bell labs, then in a robotics startup, after this in a big data, AI startup and now I work in an established telecoms company. I think this was the best move for me, I got first hand experience in professional C, C++, Rust development with agile, scrum, CI/CD and all the skills needed to bring and scale a software product to market. In all I spent 4 year moving between these roles and no two role were the same. As I'm typing today I'm in a much stronger position as a developer and a much more mature person. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;End of the introduction part II&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I'm going to stop here in the story and write about my experience in industry in the next post, ill also talk about how I worked on the system on the side and came to the realisation I needed to make it an opensource library with a showcase free to use application. There are probably two or three more posts of content before I can get up to date with what I'm working on now; and my future plans. &lt;/p&gt;

&lt;p&gt;Looking forward to seeing you in the next one.&lt;/p&gt;

&lt;p&gt;Shane &lt;/p&gt;

</description>
      <category>cpp</category>
      <category>computervision</category>
      <category>opensource</category>
      <category>devjournal</category>
    </item>
    <item>
      <title>Beatspeak DevBlog 1 Computer Vision + Telehealth = passion project</title>
      <dc:creator>Shane Hamilton</dc:creator>
      <pubDate>Tue, 02 May 2023 14:35:59 +0000</pubDate>
      <link>https://dev.to/lshanel/beatspeak-devblog-1-computer-vision-telehealth-passion-project-4hbp</link>
      <guid>https://dev.to/lshanel/beatspeak-devblog-1-computer-vision-telehealth-passion-project-4hbp</guid>
      <description>&lt;p&gt;&lt;strong&gt;Origin Story Part I&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is my first post for a project I first started working on in 2017; this first post will probably be long and more story than technical but I want to give the back story and history of this project as I commit to giving regular updates on its progress. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Project&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The project is a c++, computer vision based system that detects a users heartrate and other signals to infer and flag potential health issues. You see an old demo of it running on a raspberry pi &lt;a href="https://drive.google.com/file/d/1savd6q4Dwe4aXOh69gw-o9q53X50EgAe/view?usp=share_link"&gt;here&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Motivation&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When I started the project the main driving force was curiosity and a frustration with a product I had developed in my first job after college, I also made the assumptions that if I mapped the path correctly I could use the project as a vehicle to really push my development skills to the next level. The final aspect of starting the project was I wanted something to use to get involved in the then new startup and development community in Dublin at the time. &lt;/p&gt;

&lt;p&gt;As I sit here now typing I know that the startup lifestyle of extreme focus and half decades of iterations on a single product isn't for me; but at the time I was excited about the freedom of working of projects I was passionate about. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Project Backstory&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I had found my time in college very frustrating, juggling three part time jobs with then undiagnosed ADHD and Dyslexia made for a miserable experience on my part. It might not come as a great surprise that my grades were equally as miserable, however glimmers of light did appear. I really excelled in the labs and in the few software modules we had. It was just a shame that the labs only provided a pass fail grade and the software modules were exterminated with classic pen and paper end of semester tests(I still get a cold sweat thinking about exam halls). When you are failing at most subjects I think its natural to fixate on the few that you excel at, for me this was electronics and coding, while ADHD is a barrier to classic academics its can be a superpower for Hardware and Software development in which getting lost for hours tinkering left me with a love of both and an intimate understanding for any technology I worked on. &lt;/p&gt;

&lt;p&gt;Hitting the job market after college was a rough experience to say the least, while all my friends were starting exciting well paid graduate programs my inbox was worryingly empty. Luckily I was tossed a life line by a new Entrepreneurship program and scholarship at my university. I threw together an idea and quickly built a prototype using a raspberry pi and some python, the prototype itself has been lost to time.&lt;/p&gt;

&lt;p&gt;This was a hardware based project that used a wearable monitor that were all the rage at the time. The idea was simple use heart rate as an early warning system. It wasn't the most original idea, I knew from tracking my own heart rate in the gym and on runs I could spot myself getting sick before the major symptoms showed up. It wasn't much of a logical jump to realise I could do some basic signal analysis to automate this and maybe even mine more info. &lt;/p&gt;

&lt;p&gt;Having a demo really helped and I got a place on the program, it had a monthly stipend and more importantly came with a place to live in the middle of a rent crisis. I went to the daily mentoring sessions and the networking sessions, I drank the startup culture cool aid of fake it till you make it; for a few months at least. &lt;/p&gt;

&lt;p&gt;After three months the program came to an end, at the time (and now) people generally didn't invest in 20 somethings with nothing but an idea. So I brought what I had built to a few local large companies and managed to sell the idea to a company that made horse blankets. The salary was terrible barely liveable and I was the only engineer in the whole company but the experience was incredible. This company had manufacturing on site and in Asia, with in six months we had developed a product and brought it to market, we won numerous trade show innovation awards and I got to travel a lot. In the end I moved on from the project to bigger and better opportunities, I was happy with my experience and felt lucky but I was still frustrated with not being able to develop my original vision. &lt;/p&gt;

&lt;p&gt;I wanted to build a cheap passive system for users to get an early warning on health issues as prevention is the best treatment, in the end I had built a temperature sensor that guilt-ed users into buying heavier horse blankets from my employer. &lt;/p&gt;

&lt;p&gt;One of the main reasons we couldn't add heart rate sensors was because of the requirement of skin contact, this led to chaffing and all kinds of infections on animals. It was fundamentally an issue of comfort and passive monitoring, similar to products designed for humans the value of the data only comes after long periods of time so any product really need to be a silent observer with minimal obstruction. Based on this frustration I came to the conclusion I would need to build a device that was non contact and remote. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Ideation and iteration&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;My first guess was audio, it was a simple assumption I can hear a heartbeat if i'm close and a doctor uses a stethoscope. I built some prototypes and it was a clear improvement but the hardware was big and bulky and there was serious issues with cost and battery life, the value of the data in a medically un-certified device isn't high enough to justify large investments in time or money for most people.&lt;/p&gt;

&lt;p&gt;With the hardware there was also a large investment upfront that wasn't feasible for a few broke graduates barely able to pay rent. &lt;/p&gt;

&lt;p&gt;As hardware wasn't an option the next logical choice was to use mobile phones. Building an app wouldn't require any capital and comes with a ready made distribution path. The audio was the first thing I tried but most people don't put t phones close to their hearts on a day to day basis. It was pretty clear to me there wasn't much going on around a persons pocket to pick up a heart rate with so the mobile device quickly became a dead end.&lt;/p&gt;

&lt;p&gt;My next instinct was that a heart rate is signal that repeats regularly so If i can measure something its present in I should be able to filter it out with a Fast Fourier. This train of thought lead me to a number of papers published on using computer vision to detect heart rate.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Heart rate from computer vision&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This part was really exciting I could see from the papers that by using computer vision it was possible not only to find the heart rate but that it was also really accurate if done right. The best part was it was all software based I didn't need to invest in an expensive hardware platform I could use a laptop or a smart phone.&lt;/p&gt;

&lt;p&gt;I came a cross a method developed in MIT that used head movement and not the more popular skin pigmentation that you might be familiar with, this came with advantages in accuracy and universality. They built their system in matlab and it was a batch post process approach. I got really excited at this point and decided I wanted to build a real time version. This was exciting for a few reasons the first and obvious was it solved my problem but the other reason was I needed a software project to get lost in to push my software skills to switch from a hardware engineer who could code to a pure software engineer. &lt;/p&gt;

&lt;p&gt;I stayed up all night and built a quick prototype in python using opencv. It was held together with wishful thinking and spaghetti code but it proved the concept to me. I was between jobs at the time and free lancing to try cover my rent so I developed the idea into a system for hospitals to automate a task for nurses in which they have to take the heart rate of 8 patients every hour and use it in a calculation (in pen and paper) to asses the risk to a patients life. My idea was to automate this task take the cognitive load off overworked nurses who often had all there attention on one or two patients who were really struggling. I knew the certification process would be really hard and need investment and that would  probably require a patent and business plan that made opensource impossible but at the time I thought it was the best approach. I have since realised the error in my logic and the naivety in thinking only enough profit would be made to fund the system.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;From prototype to proto business plan&lt;/strong&gt;&lt;br&gt;
I used the prototype and idea to win a place on a state run entrepreneur program that came with a monthly stipend and mentoring. The stipend was incredible for the first time in my adult life I could breath, I wasn't terrified of eviction or where my next meal would come from. I would work on the business side during the day and code late into the night. This was an incredibly productive part of my life however I will stop now and pick up the story in my next post next week.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Next up Part two&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In the next part I will talk about why I switched to C++, how I learned this amazing language and my late discovery and total conversion to opensource development.&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>development</category>
      <category>cpp</category>
      <category>devjournal</category>
    </item>
  </channel>
</rss>
