As if a bad pun isn’t bad enough, I had to go and sketch it too.
As if a bad pun isn’t bad enough, I had to go and sketch it too.
If you’ve ever had to place map elements like north arrows, text or scalebars on an ArcGIS made map, you know how they can get lost in the background of imagery or some other basemap. You can always try to change the items color or size to make it stand out. But the easier and more effective method is to change its background color to a solid color like white.
The problem with doing that is the background extent only stretches to the edges of its element. There is no padding between the element edge and the background edge. Thankfully, ArcMap provides us with the ability to set a gap between the two edges.
How to fix it
In ArcMap, right-click or double-click on the element to open its properties. Open the Borders and Background tab and select your backround color from the dropdown. Next, change the X and Y values next to “Gap”. The higher the number, the more padding you’ll get between element and background edge. You can also apply a “Rounding” percentage value to give your background panel rounded corners. That’s all it takes to make your ArcGIS map easier to read and more professional looking.
I was home sick from work the other day and had plenty of time to think. It occured to me that whenever I go in to the office I am very productive almost immediately. When I’m home, I tend to have little enthusiasm for programming. When I attempt to program at home I’m usually nowhere near as productive as at the office.
It hasn’t always been that way. When I lived in Las Vegas I wrote code at home on a regular basis. My immediate thought was that I don’t currently have the right hardware to be productive at home. In Las Vegas I had a decent desktop PC with two monitors and a hardwired internet connection. I currently have an old, slow laptop that shares a wireless connection among several people and lots of devices.
I started realizing that it’s less the hardware and software that impacts my productivity and more the intended use of those things. When I go to the office, I use that computer for work. My home computer is used for surfing the web, writing emails and watching Netflix. When I sit down at it, my brain switches to mindless mode. I find myself wandering, checking email or googling things that pop into my mind.
So it’s less the development environment and more the developer’s environment that inluences his productivity. In my Las Vegas home I had set up my computer in a separate room and only really used it for programming. We had a separate laptop (the same one I have now) for web surfing and intertainment. For me, I have to have a psychological, if not physical, separation between work (anything that takes concentration and thought) and play. I would like to spend some time working on some open source projects on the weekends so it looks like I’m going to have to carve out some space in the house or a dedicated office.
I’m addicted to browser tabs. Right now on my work computer I have 39 tabs open. I have a fairly large screen but with this many tabs open I can’t even see their titles anymore. I usually just forget about what’s there until some point in the future when I end up deleting a bunch of them just so I can see which tab my email’s on.
Of course, every tab is important to me. Each one is a blog post I want to read or a tutorial I just don’t have time to go through yet. I’ve tried bookmarking pages instead but without something in front of me I usually just forget that I have things bookmarked. Of course I usually just forget that I have things tabbed too.
One thing that sort of works, sometimes, is to organize my bookmarks into logical folders and then show those folders on my bookmarks bar. But then my bookmarks bar gets too long and a lot of the folders get hidden and I end up forgetting about them anyway.
My work computer has a solid state hard drive, a 3.4 GHz i7 processor and 32 GB of ram. It has no problem holding 40+ tabs open in Chrome along with running five to ten other programs I regularly use. My problem is just being able to see what the tabs hold so I can read them later.
At home, however, I have a different problem. My home computer is a 7 year old laptop with a core 2 duo and only 3GB of ram running Windows 10. But I still have my tab addiction. Unfortunately, I’ve hooked my wife on tabs too. Now two of us want to bounce from site to site and keep everything we’ve seen open. Arrggghhh, there’s too much interesting stuff on the internet!
My home laptop slows to a crawl if I use Chrome with more than about four tabs open. And good luck having any other programs open at the same time. The best solution would probably be to just close tabs or at least bookmark them and hope to someday remember to look at the bookmarks. But no, I found a way to force my ancient computer to keep my tabs up without crashing.
I loaded the Chrome extension called The Great Suspender. It suspends (surprise, surprise) tabs that haven’t been focused for more than a set amount of time. When you click on a suspended tab it reloads and away you go. This way I can keep lots of tabs open without affecting my system’s performance.
Yes, it’s a band aid for a problem that should be fixed by bookmarking or something. Of course, now that I think about it, when I have a screen full of tabs open I usually forget to go back and look at them anyway. My parents used to tell me that if I couldn’t remember something, it probably wasn’t that important anyway. And if most of the things my tabs hold aren’t that important, maybe I shouldn’t keep them around in the first place.
I need to get out more.
It’s that time of year again. The time when I wait too long to plant my cool weather garden. I then wait too long to plant my warmer garden. All of that comes after I’ve already forgotten to amend the soil properly for the particular plants I want to grow. But hey, every year’s a new year. Even though I should have already sown my first round of carrots, radishes, lettuce and peas, I can still get them in a little late. And there’s always Fall and early Winter.
My biggest goal this year is to get a harvest of winter squash off the vine and onto my plate. Last year’s crop was absolutely decimated by squash bugs. I had amazing plants with beautiful leaves but I let the squash bugs get established. They destroyed everything. It’s hard to see vibrant plants start to put out fruit only to see everything killed by little vine-boring punks.
I’m determined that this year will be different. I plan on putting in fewer plants and defending them to the death against the insidious squash but. There are lots of great ideas in books and on the internet of ways to kill or deter them organically (the only way I grow food plants). One can try Castile soap sprays, diatomaceous earth, row covers, traps, companion plants, oils and others. I’m willing to try them all. The ultimate, of course, would be to design a garden defense system that uses computer vision and laser beams to blast bugs. I might need to put a little more thought into that one.
I love Kabocha, Acorn, Delicata and Spaghetti squash. I’d love them even more if they came from my garden rather than the store’s shelves. With a little care and attention, along with a healthy dose of bug violence, I might be able to make it happen this year. Now I just have to go put it all on the calendar so I don’t forget to actually do it.
Now I needed a way to change what the language tag said. Unfortunately, Github doesn’t give you a good way to do this. The Linguist library does give you options to ignore files from third parties though. Here’s how you do it:
Save your file, commit it and push it to your remote Github repository.
This takes the third-party code out of consideration for the Linguist algorithm. Once you refresh your Github page the language tag should be different. If the language still doesn’t match what you think it should, try adding the “linguist-vendored” tag to other folders to reduce the types of files Linguist searches.
Condensed version of This Post
Use Yarn in place of npm: Workflows don’t change; Packages load faster; Consistent node_module structure.
yarn init = npm init yarn install = npm install yarn add [package] = npm install [package] --save yarn add [package] --dev = npm install [package] --save-dev yarn remove [package] = npm uninstall [package]
Longer Version of This Post
Installation and Use
Deterministic Package Installs
Comments aren’t part of the official JSON specification. According to an old (2012) Google Plus post by Douglas Crockford, he removed them to preserve interoperability. But that same post suggests you can still use comments so long as you remove them through minification before parsing.
There are a few other ways to handle JSON comments besides minification:
There are several ways to take care of the problem of commenting JSON files. All have their strengths and weaknesses. The best method depends on your particular situation and needs.
One of the coolest modern versions of these old arcade classics is actually kind of useful. Ztype is a simple shooter game along the lines of Galaga but you are shooting words and you have to type them in correctly or your ship doesn’t shoot. It’s an addictive game with great graphics and sounds.
But I needed something simpler to get me started and familiar with the game engine I had chosen to start with – Phaser. I found an amazing tutorial on how to re-build Asteroids over on zekechan.net. It is surprisingly straightforward, provides full code to check yours against, is easy to follow but goes in depth enough to take you through developing an entire game.
However, by the time I was finished building the game, I was a little bored with the idea of a ship trying to destroy asteroids so I switched it up a bit to include a political theme appropriate for the current presidential race. You can check it out at http://ryanrandom.com/ted .