<?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>Forem: Andy Hopwood</title>
    <description>The latest articles on Forem by Andy Hopwood (@andhop).</description>
    <link>https://forem.com/andhop</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%2F127395%2F8b714460-66a7-428f-97f3-7afc0c0e3df6.jpg</url>
      <title>Forem: Andy Hopwood</title>
      <link>https://forem.com/andhop</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/andhop"/>
    <language>en</language>
    <item>
      <title>Andy - Origins (of me coding)</title>
      <dc:creator>Andy Hopwood</dc:creator>
      <pubDate>Tue, 26 May 2020 09:08:54 +0000</pubDate>
      <link>https://forem.com/andhop/andy-origins-of-me-coding-3j0m</link>
      <guid>https://forem.com/andhop/andy-origins-of-me-coding-3j0m</guid>
      <description>&lt;p&gt;So I thought I'd share my personal experience of when and how I started coding. I'm sure everyone has a different story. But this mine.&lt;/p&gt;

&lt;h2&gt;
  
  
  Before it all
&lt;/h2&gt;

&lt;p&gt;I guess my first coding experience was when I was around 8yo. My brother and I got an Atari 65XE&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fa7riqz3vhl80jk3awcs4.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fa7riqz3vhl80jk3awcs4.jpg" alt="Atari 65XE" width="400" height="341"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you're old as balls like me you'll remember these types of computers. Games were on tape and took about an hour to load...and god forbid you walked, sneezed or breathed around it whilst it was loading. Other wise your hour long wait would start again. &lt;/p&gt;

&lt;p&gt;Anyway...&lt;/p&gt;

&lt;p&gt;For you young'uns, there was no graphical operating system. Just a console. The instructions for the Atarti had some code solutions in the back. I remember, painstakingly typing these in. If you got it wrong and it didn't work you had to start typing it &lt;strong&gt;All OVER AGAIN&lt;/strong&gt;. But if you got it right, you were rewarded with something like a green dinosaur, made up of massive pixels. &lt;/p&gt;

&lt;p&gt;So this is an example of the code you could write.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F11eipc4q1f52ynw5zcrz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F11eipc4q1f52ynw5zcrz.png" alt="Atari Code" width="336" height="240"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Beautiful right?!...😬&lt;/p&gt;

&lt;p&gt;I didn't see this as coding at the time. Just a thing to complete. &lt;/p&gt;

&lt;h2&gt;
  
  
  Fast forward to adulthood
&lt;/h2&gt;

&lt;p&gt;I hadn't done anything remotely techy at all since the Atari. It took me till about 26ish years old to get a computer in my house. I wasn't interested in owning one before then.&lt;/p&gt;

&lt;p&gt;My brother fell on some hard times and came to live with me. His friend was selling his old computer so my brother suggested we buy it AND get internet. (That's right. I didn't even have internet at this point) &lt;/p&gt;

&lt;blockquote&gt;
&lt;h4&gt;
  
  
  Side Note!
&lt;/h4&gt;

&lt;p&gt;My brother has a YouTube Channel! Why not go have a watch and maybe give him a follow. Its comedy but he also cooks 🤷‍♂️😂&lt;br&gt;
&lt;a href="https://www.youtube.com/channel/UCjd68aVTfquMfMIzO_CKW5A" rel="noopener noreferrer"&gt;Chris the butcher&lt;/a&gt; &lt;br&gt;
&lt;strong&gt;Warning! He has a mouth like a trucker&lt;/strong&gt; &lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/Gzkt8m4xqKo"&gt;
&lt;/iframe&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Anyway...we bought the computer..
&lt;/h3&gt;

&lt;p&gt;Although i didn't even think about programming at this point, it peaked my interest in computers.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;...also lead to me sitting up all night playing Max Payne and paying for it severely the next day!&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Fast Forward a year (maybe less)
&lt;/h2&gt;




&lt;p&gt;I met, who is now my wife, Laura. After dating a good while we decided to get married. Ya know...seal the deal. So she was working hard planning  &lt;strong&gt;EVERYTHING&lt;/strong&gt;. &lt;/p&gt;

&lt;h3&gt;
  
  
  what could I do?
&lt;/h3&gt;

&lt;p&gt;Well. I randomly thought...&lt;/p&gt;

&lt;blockquote&gt;
&lt;h3&gt;
  
  
  I know!
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;I'll make a website for it!&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I had no experience at all and all I knew was a friend earning a little cash once making a website in Microsoft publisher! 😬&lt;/p&gt;

&lt;p&gt;So that's where I was going to start! &lt;/p&gt;

&lt;h1&gt;
  
  
  generate or nothing
&lt;/h1&gt;

&lt;p&gt;MS Publisher gives you a drag and drop way of making anything, including websites. But you could also drag a code block in. At first I wasn't even remotely interested in this feature. But the more i went on i wanted to add "cool" features. &lt;/p&gt;

&lt;p&gt;I got it in my head that I would want guests to be able to RSVP to the wedding on the site. I had no idea/awareness of server side code. I just thought. I'll Google it when i come to that bit. &lt;/p&gt;

&lt;p&gt;My first priority at this point was to create a form for people to login. Then another form to RSVP and give any dietary info.&lt;/p&gt;

&lt;p&gt;So I found a html form &lt;strong&gt;generator&lt;/strong&gt; online. &lt;/p&gt;

&lt;p&gt;But for some reason, rather than copy and paste, I decided to type the code that was generated. I immediately loved seeing that code turn into something on the screen...&lt;/p&gt;

&lt;p&gt;...&lt;strong&gt;I was hooked&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I even started making something in my work for accessing email templates. This was a massive MS publisher file though and quickly became a nightmare to maintain. &lt;/p&gt;

&lt;h1&gt;
  
  
  Explain it to me like I'm a dummy year old
&lt;/h1&gt;

&lt;p&gt;I &lt;strong&gt;wanted&lt;/strong&gt; to learn more. Suddenly doing it in MS publisher&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;felt like cheating&lt;/li&gt;
&lt;li&gt;was slow when you got a lot in there&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So I looked around for a book or something to help me. I stumbled across &lt;strong&gt;Html, CSS and javascript for Dummies&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This seemed like a great fit for me 🙈😂&lt;/p&gt;

&lt;p&gt;This book became my bible. I carried it everywhere. until one day...I scrapped my MS Publisher projects, opened up notepad and started actually coding. &lt;/p&gt;

&lt;p&gt;I felt like "real" programmer from this point. I didnt feel like I was cheating. &lt;/p&gt;

&lt;h2&gt;
  
  
  the game changer
&lt;/h2&gt;

&lt;p&gt;There was a php and mysql section in the book. I had no idea about databases and server side programming. I always used websites where I could login and see content that was just for me. Rather than a static site where everyone saw the same. When I started html, css and javascript I wondered how it was done. This part of the book opened my eyes. &lt;/p&gt;

&lt;p&gt;From there I finally created a website for mine and my wife's wedding. Guests of the wedding were sent passwords with their invite. They would login and be able to rsvp for themselves as well as their family members that were also invited and pick any dietary needs. The site also had a gallery on it. To show pictures of our engagement party and eventually the wedding.&lt;/p&gt;

&lt;p&gt;Unfortunately, this site was hacked after the wedding and the hacker deleted everything. Kindly leaving his email address to put everything back for a fee 😒&lt;/p&gt;

&lt;p&gt;He also placed some very curious php files on there and some db entries referring to them. So i deleted the whole site. But it didn't deter me in the slightest. &lt;/p&gt;

&lt;p&gt;After this, I carried on learning. I took a special interest in C#. I love this programming language and its served me well over the years. I still use php too. Mainly because linux hosting is so damn cheap 😂&lt;/p&gt;

&lt;h1&gt;
  
  
  What's your story? Drop a link to your blog post about it underneath. Id love to hear it!
&lt;/h1&gt;

</description>
    </item>
    <item>
      <title>Twitter - How to make a live feed of your fave tweeps</title>
      <dc:creator>Andy Hopwood</dc:creator>
      <pubDate>Tue, 07 Apr 2020 06:36:10 +0000</pubDate>
      <link>https://forem.com/andhop/twitter-how-to-make-a-live-feed-of-your-fave-tweeps-1e9i</link>
      <guid>https://forem.com/andhop/twitter-how-to-make-a-live-feed-of-your-fave-tweeps-1e9i</guid>
      <description>&lt;p&gt;Twitter is a great place to inject yourself into a network of people with similar interests. Whether it be programming, or Soccer or just to entertain with Jokes about your sex tape being just you drinking copious amounts of coffee. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;anyway...&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A little known feature of the search on twitter is the &lt;a href="https://developer.twitter.com/en/docs/tweets/rules-and-filtering/overview/standard-operators" rel="noopener noreferrer"&gt;Search Operators&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;These are flags that can be used to filter your search with certain criteria.&lt;/p&gt;

&lt;p&gt;Using these you can make a search link that contains all the tweets by all your favourite accounts. &lt;/p&gt;

&lt;h2&gt;
  
  
  Why would you want this?
&lt;/h2&gt;

&lt;p&gt;Well, if you follow a lot of people, you lose some people's post through various things like the twitter algorithm or just simply time differences.&lt;/p&gt;

&lt;h2&gt;
  
  
  So what are Search Operators?
&lt;/h2&gt;

&lt;p&gt;They're a little like SQL Operators. For example, you can use &lt;code&gt;AND&lt;/code&gt; and &lt;code&gt;OR&lt;/code&gt; in the search. &lt;/p&gt;

&lt;h2&gt;
  
  
  Lets start simple
&lt;/h2&gt;

&lt;p&gt;Say you wanted to search for tweets from a specific user.&lt;/p&gt;

&lt;p&gt;You'd be tempted to just search their '@'. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;But.....&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This will give you &lt;strong&gt;EVERYTHING&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;You'll get tweets from them, that mention them and even posts from accounts that are similar.&lt;/p&gt;

&lt;h3&gt;
  
  
  The FROM Operator
&lt;/h3&gt;

&lt;p&gt;In the search bar try&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="no"&gt;FROM&lt;/span&gt;&lt;span class="ss"&gt;:AndyHopwood2&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Hit search and you will get everything from me.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;my tweets&lt;/li&gt;
&lt;li&gt;my replies&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You might only care about actual tweets. &lt;/p&gt;

&lt;h3&gt;
  
  
  So how do we surpress replies?
&lt;/h3&gt;

&lt;p&gt;Well theres 2 things to consider here. The first is the filter operator. This allows you to filter types of posts to return in your search. So...let's alter our search string&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="no"&gt;FROM&lt;/span&gt;&lt;span class="ss"&gt;:AndyHopwood2&lt;/span&gt;
&lt;span class="n"&gt;filter&lt;/span&gt;&lt;span class="ss"&gt;:replies&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you search with this you'll notice you get nothing but my replies. that's not quite what we want. &lt;/p&gt;

&lt;p&gt;To make the filter, filter things &lt;strong&gt;&lt;strong&gt;out&lt;/strong&gt;&lt;/strong&gt; of your search you can add a minus sign (&lt;code&gt;-&lt;/code&gt;) just before the filter. so lets update our text.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="no"&gt;FROM&lt;/span&gt;&lt;span class="ss"&gt;:AndyHopwood2&lt;/span&gt; 
&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;filter&lt;/span&gt;&lt;span class="ss"&gt;:replies&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So now you'll have &lt;strong&gt;Nothing&lt;/strong&gt; but my tweets. (Take a look. Like, retweet, share if you like 😁) &lt;/p&gt;

&lt;h3&gt;
  
  
  So how to make it pick up a few people?
&lt;/h3&gt;

&lt;h4&gt;
  
  
  That's part of the point of the post, right??
&lt;/h4&gt;

&lt;h3&gt;
  
  
  The OR Operator
&lt;/h3&gt;

&lt;p&gt;If you combine our FROM operator with the OR operator you will get tweets from JUST those people.&lt;/p&gt;

&lt;p&gt;To make it work, you have to keep repeating the FROM. &lt;/p&gt;

&lt;p&gt;for example..&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="no"&gt;FROM&lt;/span&gt;&lt;span class="ss"&gt;:User1&lt;/span&gt;
&lt;span class="no"&gt;OR&lt;/span&gt; &lt;span class="no"&gt;FROM&lt;/span&gt;&lt;span class="ss"&gt;:User2&lt;/span&gt;
&lt;span class="no"&gt;OR&lt;/span&gt; &lt;span class="no"&gt;FROM&lt;/span&gt;&lt;span class="ss"&gt;:User3&lt;/span&gt;
&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;filer&lt;/span&gt;&lt;span class="ss"&gt;:replies&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  So lets get a few @'s together..
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="no"&gt;FROM&lt;/span&gt;&lt;span class="ss"&gt;:AndyHopwood2&lt;/span&gt; 
&lt;span class="no"&gt;OR&lt;/span&gt; &lt;span class="no"&gt;FROM&lt;/span&gt;&lt;span class="ss"&gt;:telmo&lt;/span&gt; 
&lt;span class="no"&gt;OR&lt;/span&gt; &lt;span class="no"&gt;FROM&lt;/span&gt;&lt;span class="ss"&gt;:EmmaBostian&lt;/span&gt; 
&lt;span class="no"&gt;OR&lt;/span&gt; &lt;span class="no"&gt;FROM&lt;/span&gt;&lt;span class="ss"&gt;:catalinmpit&lt;/span&gt; 
&lt;span class="no"&gt;OR&lt;/span&gt; &lt;span class="no"&gt;FROM&lt;/span&gt;&lt;span class="ss"&gt;:ASpittel&lt;/span&gt; 
&lt;span class="no"&gt;OR&lt;/span&gt; &lt;span class="no"&gt;FROM&lt;/span&gt;&lt;span class="ss"&gt;:shanselman&lt;/span&gt; 
&lt;span class="no"&gt;OR&lt;/span&gt; &lt;span class="no"&gt;FROM&lt;/span&gt;&lt;span class="ss"&gt;:DanijelaJs&lt;/span&gt; 
&lt;span class="no"&gt;OR&lt;/span&gt; &lt;span class="no"&gt;FROM&lt;/span&gt;&lt;span class="ss"&gt;:julielosseva&lt;/span&gt; 
&lt;span class="no"&gt;OR&lt;/span&gt; &lt;span class="no"&gt;FROM&lt;/span&gt;&lt;span class="ss"&gt;:kvlly&lt;/span&gt; 
&lt;span class="no"&gt;OR&lt;/span&gt; &lt;span class="no"&gt;FROM&lt;/span&gt;&lt;span class="ss"&gt;:dxnielvaughn&lt;/span&gt; 
&lt;span class="no"&gt;OR&lt;/span&gt; &lt;span class="no"&gt;FROM&lt;/span&gt;&lt;span class="ss"&gt;:sarah_edo&lt;/span&gt; 
&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;filter&lt;/span&gt;&lt;span class="ss"&gt;:replies&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Copy this and put it in your search box. You'll see tweets from all these great programmers. &lt;/p&gt;

&lt;h3&gt;
  
  
  So how do we make this into a live feed?
&lt;/h3&gt;

&lt;p&gt;If you're using normal twitter there's not a great way to do this. You can save your search and click on that when you want to see them. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Just be aware that there seems to be a character limit on saved searches. If it's too long, you just get an error.&lt;/em&gt;&lt;/strong&gt; &lt;/p&gt;

&lt;h4&gt;
  
  
  The answer is......
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://tweetdeck.twitter.com" rel="noopener noreferrer"&gt;TweetDeck&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;For the best experience you need to use this on a desktop. It's not a third party app. It's made by twitter and is in their domain. &lt;/p&gt;

&lt;p&gt;It's a great tool. You basically have columns. Each column has the different types of content in them that are offered by twitter. Your timeline, messages, trending and notifications. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F9390r04455yryoqze2op.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F9390r04455yryoqze2op.png" alt="tweetdeck"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can remove columns if you don't want one of them cluttering up your screen. &lt;/p&gt;

&lt;p&gt;On the top left of your screen there is a search icon&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F0eg8o4f34zs1rtl211cw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F0eg8o4f34zs1rtl211cw.png" alt="Tweetdeck Search button"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Click this. The search box will appear. Paste/type your favourite people search string into there. When you hit enter, tweetdeck creates a new column with your search results in. This column is a live, updating feed of your search results! &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F4hqw8gyg0pmn4wwtxqah.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F4hqw8gyg0pmn4wwtxqah.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  So there you have it
&lt;/h2&gt;

&lt;p&gt;You now have a way of doing this. What I'd like to see is a real way of doing this on mobile. Maybe even a mobile version of tweetdeck would be cool. Maybe I'll work on one myself. Watch this space 😊&lt;/p&gt;

&lt;h2&gt;
  
  
  Side note about tweetdeck
&lt;/h2&gt;

&lt;p&gt;I thought I'd throw this in here because it's been really handy for me. &lt;/p&gt;

&lt;p&gt;On tweetdeck you can schedule tweets for later in the day. So if you think of a tweet but know you get better impressions later on or even when you sleep. You can set a date and time to send the tweet. Tweetdeck doesn't even have to be still running on your desktop. &lt;/p&gt;

&lt;p&gt;Go have fun! &lt;/p&gt;

&lt;p&gt;&lt;em&gt;**For anyone whose interested. The code block syntax I used was Ruby. Works pretty well for twitter search strings&lt;/em&gt;* 😊😂&lt;/p&gt;

</description>
      <category>twitter</category>
      <category>searchoperators</category>
      <category>networking</category>
      <category>socialnetworking</category>
    </item>
    <item>
      <title>All Wrapped Up</title>
      <dc:creator>Andy Hopwood</dc:creator>
      <pubDate>Sat, 23 Nov 2019 21:53:27 +0000</pubDate>
      <link>https://forem.com/andhop/all-wrapped-up-jfj</link>
      <guid>https://forem.com/andhop/all-wrapped-up-jfj</guid>
      <description>&lt;h2&gt;
  
  
  Wrap it up and ship it out!
&lt;/h2&gt;

&lt;p&gt;No. I know Christmas is around the corner but I'm not talking about gift wrapping. &lt;/p&gt;

&lt;p&gt;Any programming language you work on, will have great built in classes for your common tasks. e.g. Database access, File System, web services...etc.&lt;/p&gt;

&lt;p&gt;You can use these directly in your other classes perfectly fine and safely. I personally Wrap these up in my own class with it's own properties and Methods...&lt;/p&gt;

&lt;h2&gt;
  
  
  ...And Heres Why!
&lt;/h2&gt;

&lt;p&gt;As I highlighted recently, I've just started using Xojo for work. On my first project I happily wrapped up my &lt;code&gt;PostgreSQLDatabase&lt;/code&gt; calls into my own class called &lt;code&gt;DBConnection&lt;/code&gt; as I learned how to use them. I exported this class so I could re-use it. My class saved the &lt;code&gt;PostgreSQLDatabase&lt;/code&gt; object to it's own private variable and called methods from there.&lt;/p&gt;

&lt;p&gt;I made a wrapper method in this, called&lt;code&gt;SelectData&lt;/code&gt; which mapped directly to Xojo's &lt;code&gt;SQLSelect&lt;/code&gt;, which returns a &lt;code&gt;Recordset&lt;/code&gt;.&lt;/p&gt;

&lt;h4&gt;
  
  
  The Method
&lt;/h4&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight vb"&gt;&lt;code&gt;&lt;span class="n"&gt;public&lt;/span&gt; &lt;span class="k"&gt;Function&lt;/span&gt; &lt;span class="nf"&gt;SelectData&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Sql&lt;/span&gt; &lt;span class="ow"&gt;As&lt;/span&gt; &lt;span class="kt"&gt;String&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="ow"&gt;As&lt;/span&gt; &lt;span class="n"&gt;RecordSet&lt;/span&gt;
    &lt;span class="k"&gt;Return&lt;/span&gt; &lt;span class="n"&gt;Self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;CurrentConnection&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;SQLSelect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Sql&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;End&lt;/span&gt; &lt;span class="k"&gt;Function&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;It's that simple!! So I hear ya...&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Why Is that Useful??&lt;/p&gt;

&lt;p&gt;Can't you just call that directly in your code??&lt;/p&gt;

&lt;p&gt;How many coffee breaks did you take whilst writing that??&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Well I'll answer them now!&lt;/p&gt;

&lt;h3&gt;
  
  
  Xojo API 2.0
&lt;/h3&gt;

&lt;p&gt;In the update there was a new Data Type called &lt;code&gt;RowSet&lt;/code&gt; and with it a slightly renamed method for selecting data from a database. &lt;/p&gt;

&lt;p&gt;The advantage in this new data type is with error catching. The &lt;code&gt;Recordset&lt;/code&gt; had "Silent Errors" where the software you are building would just carry on as if the select data had produced no data.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Change
&lt;/h2&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight vb"&gt;&lt;code&gt;&lt;span class="n"&gt;public&lt;/span&gt; &lt;span class="k"&gt;Function&lt;/span&gt; &lt;span class="nf"&gt;SelectData&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Sql&lt;/span&gt; &lt;span class="ow"&gt;As&lt;/span&gt; &lt;span class="kt"&gt;String&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="ow"&gt;As&lt;/span&gt; &lt;span class="n"&gt;RecordSet&lt;/span&gt;
    &lt;span class="k"&gt;Return&lt;/span&gt; &lt;span class="n"&gt;Self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;CurrentConnection&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;SelectSQL&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Sql&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;End&lt;/span&gt; &lt;span class="k"&gt;Function&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h3&gt;
  
  
  Can ya see it??
&lt;/h3&gt;

&lt;p&gt;...it's subtle. &lt;/p&gt;

&lt;p&gt;We've basically gone from..&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight vb"&gt;&lt;code&gt;&lt;span class="n"&gt;Self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;CurrentConnection&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;SQLSelect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Sql&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;to&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight vb"&gt;&lt;code&gt;&lt;span class="n"&gt;Self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;CurrentConnection&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;SelectSQL&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Sql&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;so to answer the question, Why is that useful?&lt;/p&gt;

&lt;p&gt;If everywhere in my code, I had called &lt;code&gt;SQLSelect(Sql)&lt;/code&gt;, to get data from my database, I would've had to have found them all to change it.&lt;/p&gt;

&lt;p&gt;In my case the only change I made was the one you've just seen. &lt;/p&gt;

&lt;h2&gt;
  
  
  In Conclusion
&lt;/h2&gt;

&lt;p&gt;Wrapping up the code meant I could make that change in function name in one spot rather than various spots throughout my program. &lt;/p&gt;

</description>
      <category>xojowrappersclasses</category>
    </item>
    <item>
      <title>Learning Xojo - episode 1</title>
      <dc:creator>Andy Hopwood</dc:creator>
      <pubDate>Sun, 08 Sep 2019 20:41:27 +0000</pubDate>
      <link>https://forem.com/andhop/learning-xojo-episode-1-4h1o</link>
      <guid>https://forem.com/andhop/learning-xojo-episode-1-4h1o</guid>
      <description>&lt;p&gt;I recently starting working for a company who have decided to migrate their platform, bit by bit into Xojo from a Node/React platform. &lt;/p&gt;

&lt;p&gt;Those of you who have never heard of Xojo, It's a cross platform development environment that ports out to Web, Windows, Mac, Linux and IOS.&lt;/p&gt;

&lt;p&gt;if you want to know more go have a read yourself at &lt;a href="https://xojo.com" rel="noopener noreferrer"&gt;Xojo.com&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The visual dilemma
&lt;/h2&gt;

&lt;p&gt;When writing a web application, I at least expect to write some HTML and CSS. With Xojo this is not the case. When you download Xojo it comes with it's own editor. The editor has a WYSIWYG editor. So all the UX is done with drag and drop and styling is achieved by clicking buttons and adjusting sliders. you'll see what I mean by that when I start to show you screen shots. &lt;/p&gt;

&lt;h2&gt;
  
  
  Coding in Xojo &lt;em&gt;forget the semi-colon&lt;/em&gt;
&lt;/h2&gt;

&lt;p&gt;When I first started learning how to code, one of the first languages I started with was Visual Basic. But I quickly changed to C# never expecting to ever really use the VB syntax ever again! well...&lt;strong&gt;How wrong was I??&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The Xojo coding syntax is pretty much and exact copy of VB. Adding click code is done in the same way as visual studio. You double click an Element in your designer and it opens up an event handler in a code editor. This reminds of using the VBA Editor in Excel too. &lt;/p&gt;

&lt;h2&gt;
  
  
  The point of this blog series
&lt;/h2&gt;

&lt;p&gt;I'm hoping to document my learning process as I go. I'll make a real life application and share the journey on here. Hopefully it'll be fun for all!!&lt;/p&gt;

&lt;p&gt;orrrrrrr.....I'll make an ass of myself.&lt;/p&gt;

</description>
      <category>xojo</category>
      <category>learning</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
