So I had an interesting user story the other day. I was asked to implement a new system that would allow users to pay for and download some of our templates.
This is all pretty well and easy thanks to Stripe and their Rails API. However we needed a way to allow users to download the templates using a key that expires a week after purcahse and doesn’t provide the user with the storage URL of the template. So thats what I wanted to show a way you can provide the download without giving away the proverbial cow.
Starting off with this we are going to assume a few things. We are using Ruby on Rails, Uploading is done via CarrierWave (although most of what we will show it doesn’t matter), and we are using Pundit for Authorization. …
Hey guys! Thanks for following me on Medium.
I wanted to catch up with you guys and anyone who follows my blog on programpractical.com. With my current contract coming to an end. I decided hosting my own server and wordpress account was just taking up too much time and fighting for views is not worth what I was getting via Medium.
As of now programpractical.com is a dead page, until I get the last bit of info I need from Medium to have it properly going to their site(bad planning on my part). However, Program Practical is now a publication on Medium! …
I have found while I really enjoy programming full time. It has also brought on some anxiety I was not expecting. I had been up until July a full time IT administrator for a little over 5 years. In this job while still learning a lot the majority of what I did on a day to day basis was memorized and required little to no effort.
It has been string moving into a job that while I still knew enough that after a trial run with the company they still wanted to hire me. I find my self outside my knowledge sphere on a daily basis. I love this as I’m currently learning so much. …
Making your first push to a project can be a daunting task if you are new to git. Today we are going to review how I do my checks before pushing and what you can do to avoid making mistakes prevalent to newbies.
For me my first step is always running a
git status. I do this so I can get a quick list of files that have been added/modified/deleted. When I code I might put a
Today I wanted to go over Blocks, Procs, and Lambdas in Ruby via a easy and short over view. There are a lot of post on the subjects already so I am hoping to just give a high level overview to get your interest peaked on some of the most interesting parts of the Ruby language.
Above is my last video going over Blocks and how to use them so I will keep my blocks in here short.
To overly simply what these are in a way that will probably upset more senior developers:
A nice thing to have in your Ruby journey will be a skeleton project so you can quickly get up and running when you need to create a new project. We have done this project in an earlier post for computers running Windows. However, with the upcoming video series on algorithmic challenges in Ruby I wanted to translate the old post for Mac systems. We will be doing all the commands in the terminal, and the Atom editor for writing to the files.
First we will create our skeleton project folder and its sub folders.
mkdir skeletoncd skeletonmkdir bin data doc ext lib tests…
One question I hear a lot and have even asked myself a while back ago is “When do I know enough to start looking for a job”. While this question is very complicated and depends on a lot of factors I wanted to go into my background a bit and what got me to the point of saying “I know enough”.
Like I’ve mentioned in the past I have about 5 years of hobbyist programming under my belt but until recently I have not really had much to show for it. …
Today I wanted to review automating code review inside of ruby.
Their meeting great open source projects to help make sure you are sticking to an idiomatic way of coding in ruby. The main one I will focus on today is Robocop and Robocop-git.
Rubocop is an open source gym for ruby that will review your project and let you know of any “best practices” you are not adhering too. As described on the Rubocop github page. Out of the box it will enforce guidelines set by the Ruby Style Guide.
Best of all, not only will it report problems to you, but using the -a flag it can even auto correct many of the problems it fined. …
Program Practical is now on youtube. This month I am moving to a bi-media format with blog post going to start coming out weekly on Program Practical, as well weekly video post on YouTube.
These post will cover a range of programming topics, from progress updates, coding tutorials, and coding news. I will be currently be focused more on Ruby and Rails, but might jump into C++, Python, and other languages depending on my current project or topic request.
The current videos in the pipeline include a background on my coding past, some code problem solving in C++, and one I’m shooting tonight on making Linked List in Ruby. …
We are officially into april now I figured I would do my monthly wrap up and planning blog. March was an okayish month. If you follow along you would noticed I only ended up posting 3 times last month. While I am working on studying a lot I have started looking at developer jobs. With this I’m not posting too much about the places or the journey but it has shaped a bit about what I will be doing this month.
First off to catch up on what was done last month. I have started doing some live streaming although disorganized it’s a start. During the stream I was working on adding a new feature to a gem rubocop-git. That is currently pending via pull request but is available on my page. I have also continued on the rails tutorial but have chosen not to live stream that due to the content and with the reading, it’s not a good stream subject. …