Commit 2f673334 authored by Shane A. Stillwell's avatar Shane A. Stillwell 🎯

fix: Add more to have better summaries

parent 83ab5fb6
To break the summary use the line with
```
<!--more-->
```
......@@ -9,6 +9,8 @@ tags:
> If you've found this article, then you've banged your head against the problem of being on a restrictive VPN and using Docker at the same time. The culprit is usually Cisco AnyConnect or Junos Pulse.
<!--more-->
## The Problem
You use [Docker](https://www.docker.com/) for development. For various reasons you need to connect to a VPN, but as soon as you do, Docker stops working. There are many solutions out there, some work, others do not. The bottom line is there is no elegant solution and this solution here is not elegant, but it will work. What's happening? Yeah, when you connect, AnyConnect blunders in, overwrites all your computer's routes to send them through the VPN tunnel. Luckily, it doesn't route localhost (127.0.0.1) to the tunnel. This is our backdoor to hack ourselves in.
......
......@@ -7,6 +7,8 @@ tags:
> If you've found this article, then you've banged your head against the problem of being on a restrictive VPN and using Docker at the same time. The culprit is usually Cisco AnyConnect or Junos Pulse.
<!--more-->
## The Problem
You use [Docker](https://www.docker.com/) for development. For various reasons you need to connect to a VPN, but as soon as you do, Docker stops working. There are many solutions out there, some work, others do not. The bottom line is there is no elegant solution and this solution here is not elegant, but it will work. What's happening? Yeah, when you connect, AnyConnect blunders in, overwrites all your computer's routes to send them through the VPN tunnel. Luckily, it doesn't route localhost (127.0.0.1) to the tunnel. This is our backdoor to hack ourselves in.
......
......@@ -6,7 +6,11 @@ tags:
- Git
- Gitlab
---
You find yourself using S3 for your static frontend code and using CloudFront to serve out that static content. Here is a handy script to deploy and invalidate old versions.
<!--more-->
```
#!/bin/bash
......
......@@ -11,6 +11,8 @@ tags:
Of course you do. As a programmer, you're designed to look for better, faster, more efficient solutions to all life's problems. It's in your nature, and if you could be 10x faster, you would at least be curious.
<!--more-->
## Does This Sound Familiar
You start working on a rather large code base. The previous developers did their best to organize the project into nice subfolders, and more subfolders. Maybe it looks something like a project I worked on many years ago.
......
......@@ -7,6 +7,8 @@ tags:
In recent months I've been working to add [Apple Pay for Web](https://developer.apple.com/apple-pay/) to a major clothing retailer. One of the requirements for Apple Pay for Web is that the connection must be over HTTPS. Most of the time when I'm developing locally, I do not use HTTPS. Local, meaning the application code is running on my laptop. In most cases, HTTPS is just run in staging and production environments and not handled directly by your app code.
<!--more-->
So this posed a problem. I didn't want to work on the server where it provides an HTTPS connection, that's a pain. Also, if you're not familiar with HTTPS servers, you need to have a valid certificate and more. So this solution requires a few steps to get working, but once it does, it works nicely.
## TL;DR
......
......@@ -7,6 +7,8 @@ tags:
Let's look at a few ways we can name our database fields. This is mostly subjective, with some personal opinion mixed in for added velocity.
<!--more-->
## Naming tables
To me, this is straight forward.
......
......@@ -7,6 +7,8 @@ tags:
This doesn't happen every day, but once in a while you may find yourself needing to remove all the tables/functions/views from a PostgreSQL database. The key is you don't want to delete the database itself. Maybe you are on a hosted solution where you don't really have access to drop/restore a database. For example, I'm using [Heroku's Postgres](https://www.heroku.com/postgres) service and dropping the database is not an option.
<!--more-->
Here is a simple command that will remove all the tables and restore to new.
```shell
......
......@@ -10,6 +10,8 @@ tags:
As a hip, cutting edge developer, you're using [Hugo](https://gohugo.io/) to generate your blog or website. Wordpress... pssh, you're way too cool for that.
<!--more-->
Being cool has its complications though. How and where should you deploy your Hugo app. Should you push it locally using rsync or some other fancy means? Whatever.
This simple post is going to show you how to deploy your Hugo app using Gitlab's Continous Integration feature. Something I've fallen in love with as I've understood how to set up builds and push out my code to production. I'll be using **Cloudfront/S3** to host my Hugo site. You can checkout the following links to get more familiar with how it works.
......
......@@ -7,6 +7,8 @@ tags:
That's right. You want to take your skills from beginner, bypassing intermediate, and land on advanced. You may have just started coding a year or two ago, but you're determined to be the best developer on your team. It's going to take hard work, no getting around that, but we like hard work. You're going to feel dumb at times, no problem, you've fully embraced that feeling dumb means you're learning and that's the name of the game. Say 'good-bye' to your comfort zone, and hello to boot camp life.
<!--more-->
The following advice has served me well in the past 20 years of full time development, through many languages, platforms, environments, and goals. It will work for you. How do I know this? I've spoken to other 10x developers that agree, these skills will set you apart from your peers and give you the edge you need to get the new job, land the promotion, finish the project on time, and reduce technical debt. Hell, it'll even make your teeth whiter.
So let's begin.
......
......@@ -8,6 +8,8 @@ Today we are going to look at software developers that have come before us, layi
Don't be fooled into thinking that we have entered a period of software dev that is new and different than 30 years ago. This is simply not the case, a new language or technology doesn't change the fundamental underpinnings of how we design and develop software. We still use functions, arrays, booleans, if/else, and all these require us to assemble them together using our minds. As long as humans are involved, these principles will be here to guide us.
<!--more-->
**Chronological snobbery**
> is an argument that the thinking, art, or science of an earlier time is **inherently inferior** to that of the present, simply by virtue of its temporal priority or the belief that since civilization has advanced in certain areas, people of earlier periods were less intelligent. The term was coined by [C. S. Lewis](https://en.wikipedia.org/wiki/C._S._Lewis) and [Owen Barfield](https://en.wikipedia.org/wiki/Owen_Barfield), first mentioned by Lewis in his 1955 autobiographical work, [Surprised by Joy.](https://en.wikipedia.org/wiki/Surprised_by_Joy)
......
......@@ -8,6 +8,8 @@ title: lessons learned using mongodb
Back in 2012, there was a new way to build web apps fast and packed full of features. It was **MEAN**. MongoDB, Express, Angular, and Node. I built a number of apps with this technology, and it worked. However, as time passed they began to show their weaknesses. Today we'll look at a few lessons learned from MongoDB.
<!--more-->
## What MongoDB Kicks Butt At
Most technologies cannot be just dismissed outright, even though you read article after article telling you *"Why you should not X"*. That's just stupid, narrow minded, and immature.
......
......@@ -7,10 +7,12 @@ tags:
- JavaScript
---
#Leveraging Reflux (flux) with React like a pro
## Leveraging Reflux (flux) with React like a pro
My latest project for a well known clothing retailer has involved writing a React based web app. It has a staggering amount of data that needs to update different parts of the app. To accomplish this, we are using React (of course) and [Reflux](https://github.com/reflux/refluxjs).
<!--more-->
So you've heard React is the new hotness that all the cool developers are adding to their resume. It's supposed to cure all your front-end woes. But in fact, you'll find yourself with some new hand wringing problems to get you down. *Don't Fret*. There is a better way.
Flux is not so much a software, but a way to keep data synchronized in your front-end app. What am I talking about? Say a person enters some data into a form and presses _Send_, we need to keep that data in sync in other parts of the app. Reflux is just a re-invention of the flux concept with some powerful features and simplified tools.
......
......@@ -10,6 +10,8 @@ tags:
![Page Niedringhaus](images/nodemailer_.png "Paige Niedringhaus")
<!--more-->
## Sidenote about blogging
I appreciate Paige's candid approach in her blog post. In her article she covers her thoughts, assumptions, research notes, and willingness to put her code out there. I'm a big believer in blogging *ahem* goes without saying, I know.
......
......@@ -7,6 +7,8 @@ tags:
I love projects where I'm learning something new, don't you? When I get in a project, I want to be learning new things on a regular basis, otherwise I grow restless. Lately, I've been on a pretty big project for a client designing a backend system (GraphQL + Node.js + Postgres). I can't go into too much detail, but we've leveraged Postgres as our main data store and in the process we've had to level up on our Postgres skills. This post consists of random notes about PG that I didn't know a few months ago.
<!--more-->
---
## String types (varchar versus text)
......
......@@ -7,6 +7,7 @@ tags:
> When time is critical, exclude large files from your Postgres restore and save the world at the same time.
<!--more-->
Imagine you're a super secret spy. You've infiltrated the enemy's datacenter and you need to dump their database to save the world from being destroyed by the evil villain's satellite death rays. While fighting off ninjas, robot assassins, and a very fat Scottish overlord, you manage to dump the entire database to a secure thumbdrive. Then you make your escape in your pedal helicopter.
......
......@@ -9,6 +9,8 @@ tags:
I love [PostgreSQL](https://www.postgresql.org/), always have. I remember, it was easily more than a decade ago, when I first ran into PostgreSQL (PG). It seemed all major open source projects used MySQL. When I learned PG was also open source, plus had more SQL compliant features, I knew it would someday become the defacto open source database. At the time, the client tools, support, and pure speed were not there, but the foundation for a great product existed.
<!--more-->
Anyway, this post is not about my ❤️ for PG, but about how PG can help your [GraphQL](http://graphql.org/) efforts. First let's start out with a database example. Here we have a table for `people` and the corrisponding `emails` for those people.
```sql
......
......@@ -8,6 +8,8 @@ tags:
Databases are magic from my perspective. They take in queries, find all the information you tasked it to find, and *POOF*. In the blink of an eye, there it is, all packaged up nice and neat. *Or it blows up in your face, but that never happens, right?* Let's take a look at some steps we can take when things are not not returned in the blink of and eye. What can we do to improve our database performance.
<!--more-->
Queries to use
====
......
......@@ -7,6 +7,8 @@ tags:
This is the best way I've found to set up for a container to contact the host machine.
<!--more-->
```
sudo ifconfig lo0 alias 172.16.123.1
```
......
......@@ -8,6 +8,8 @@ tags:
I've been using [Knex](https:knex.org) for a long time, closing in on two years. Just to clarify, Knex is NOT an ORM (Object Relation Model). ORM's try to model your database into neat and logic classes, but I agree with [Laurie Voss](https://twitter.com/seldo), and [ORM is an anti-pattern](http://seldo.com/weblog/2011/08/11/orm_is_an_antipattern). I've used [Sequelize](http://docs.sequelizejs.com), [Doctrine ORM](https://www.doctrine-project.org/projects/orm.html), and others. Every. Single. Time. ORM's will let you down and keep you from leveraging your database to its fullest potential. Developers like them because you can encapsulate all the logic in the code and treat your database as just a dumb data store. This is a mistake.
<!--more-->
> Using an ORM is an anti-pattern and flies in the face of separation of concerns, abstraction, and more.
> -- Shane A. Stillwell
......
......@@ -9,6 +9,8 @@ tags:
## What is Gitlab
> An alternative to Github with many more features and an increasly better offering
<!--more-->
## Free Private Git Repositories
On of Github's price points is to offer you a limited number of private repositories. You want more, pay more. Then Bitbucket came along and offered free private repositories, but limited the number of people you could share those repositories, it made for some weird accounting at the end of the day. Gitlab however has changed such things. First it allows an unlimited number of private repositories (🎉)
......
......@@ -6,6 +6,7 @@ tags:
---
Here I want to talk about what a team should do when they start a new project. I've had the privilege to architect several large projects and to come into several existing projects having a fair amount of girth. These are just a few thoughts about things teams needs to establish sooner rather than later.
<!--more-->
## Create a glossary (terms everyone can agree on)
......@@ -79,3 +80,6 @@ This is wrong thinking. Do this immediately, it will be more difficult later. Ri
> -- Charles H. Spurgeon, All of Grace
By putting your new app through this exercise, it will correctly influence how your app will evolve and shape the direction it takes as it grows and develops.
## Resources
* Thank you to you [Johannes Plenio](https://pixabay.com/users/jplenio-7645255/) for the [thumbnail image](https://pixabay.com/photos/panorama-summer-meadow-field-away-3629120/) found on [Pixabay](https://pixabay.com/)
......@@ -7,6 +7,8 @@ tags:
[PostgreSQL](https://www.postgresql.org/) is an amazing [RDBMS](https://en.wikipedia.org/wiki/Relational_database_management_system). Not only is has it been [ACID compliant since 2001](https://www.postgresql.org/about/), it supports many data types and functions, putting it on par with Document Store systems like MongoDB. Postgres supports a wide range of JSON formats and methods to store, search, and transform JSON object data. For instance, the `to_json` and related function `json_agg` allow you to collect a row into a JSON object. Handy for when you have nested data and want PG to return an object with nested values.
<!--more-->
## An Example Usage of to_json
Let's take a look at how to use `to_json` in your queries. A really simple example involving two tables. The following SQL should create and populate two tables.
......
......@@ -8,6 +8,8 @@ tags:
## The Backstory
You may find yourself needing to redirect all traffic from your root domain `example.com`, otherwise known as the apex, to your real hostname `www.example.com`. Maybe you didn't know this, but you cannot use a CNAME on your apex domain. This will bite you in the butt when you try to use your root domain `example.com` with Heroku's SSL (HTTPS) service. Heroku will give you a hostname and tell you to create a CNAME to that hostname. However, this is not strictly possible. Some registrars can get around this by essentially providing you an HTTP redirect, but his is hack. In short, don't use your apex domain e.g. example.com, even though you see all the cool kids on the block doing it.
<!--more-->
## [Just Do It!](https://www.youtube.com/watch?v=ZXsQAXx_ao0)
### Create an Amazon S3 Bucket
......
......@@ -11,6 +11,8 @@ tags:
> A run down on the apps I use regularly and why. Caution, Mac specific drivel ahead.
<!--more-->
## Vim
Do I even need to explain? It's pretty common place for proud Vim users to show off their `.vimrc`, but I've come to find copy/paste from someone else's `.vimrc` is not really a good idea. A developer's `.vimrc` is a personal matter, crafted over time with love and affection, it suits them and their needs.
......
......@@ -9,6 +9,8 @@ tags:
Reggie writes JavaScript all day. He sits in his cubical, has his VSCode editor opened up all the time and likes to write big, long, ugly functions with his VSCode editor. Let's take a look at one of Reggie's famed functions.
<!--more-->
```javascript
const params = {
tool: true,
......
......@@ -6,7 +6,8 @@
{{ partial "seo_schema" . }}
<title>{{ .Title }}</title>
{{ with .Site.Params.description }}<meta name="description" content="{{ . }}">{{ end }}
{{ if .Site.Params.opengraph }}{{ template "_internal/opengraph.html" . }}{{ end }}
{{ template "_internal/opengraph.html" . }}
{{ template "_internal/twitter_cards.html" . }}
<link rel="dns-prefetch" href="//fonts.googleapis.com" />
<link rel="dns-prefetch" href="//fonts.gstatic.com" />
{{ with .OutputFormats.Get "RSS" -}}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment