Tag Archives: Code

Python: How to Start Scripting in ArcGIS

Header

Python in ArcGIS is intimidating, so I’m starting simple. This is a quick walk through of how to load a script for use and what a basic Python script looks like.

Continue reading

Advertisements
Tagged , , , , , ,

Processing: How to Make Transparent Textures

Alice

After a long vacation, a wedding, a bad flu, and a whole mess of planes, trains, and automobiles, I’m back to talk about textures. I love playing with transparency in scenes, but scripting transclucency is a bit unusual in Processing. The normal Processing canvas doesn’t support an alpha channel, so it requires something called PGraphics().

Continue reading

Tagged , , , , , , , , , ,

VBA: What is a Range Object?

Range Objects

“Range object” is an unnecessarily intimidating term for a collection of cells within your workbook. Say you need to run some complicated math or formatting over the same cells over and over throughout a long script. You could call on the column number and row every damn time, but who wants to do all that typing?

Continue reading

Tagged , , , , , , ,

VBA: How to Code a Letter Frequency Chart

Rolling Stones

I recently picked up a book called “Ghost in the Wires: My Adventures as the World’s Most Wanted Hacker” by Kevin Mitnick. To be totally honest, I’d never heard of Mitnick before. He was a little before my time—when he was arrested in 1995, I was still struggling to understand why the hell I had to learn fractions and everything I knew about computers was based on WarGames.

Continue reading

Tagged , , , , , , , ,

Processing: How to Randomize Textures

TheHallCompressed

Scenes with custom textures always seem to turn out better for me, but they’re hellish to make. I’ve spent hours in GIMP hand-drawing patterns, carefully testing out layers to get  effects. It’s a hassle.

However, I’m learning to automate more of that sort of thing with Processing. What’s really nice about that is you can get a texture that changes subtly every time you run the script if you use the Random function to assign coordinates, weights, and transparency values.

Continue reading

Tagged , , , , , , , ,

VBA: How to get a Range of Numbers from a List

ListToRange() Function

So I’ve finally reached that point where I’m writing Macros well enough to accomplish simple tasks, but the results are just not pretty to look at. One of my macros returns a list of numbers associated with some data in a worksheet that looks like this:

, 1, 2, 3, 4, 5, 7, 10, 11, 12, 34, 35, 36, 37

Kind of gross, right? I want a to have a concise list. And DEAR GOD, you’d think writing the logic to get 1-5, 7, 10-12, 34-37 would be breeze.

Continue reading

Tagged , , , , , , , , ,

VBA: How to Crack the Caesar Shift with Brute Force

Caesar Brute Force

Imagine you have a combination lock with 4 digits. If you wack your head against a car hood by accident and forget the combination, this means you have a problem with 255 wrong answers and 1 right one. If you had a few days to spare, you could try all of them. The marvelous thing about computers is that they can, quite easily, auto-generate all 256 possibilities and beat the lock senseless with them. Until it opens.

That’s a brute force attack.

Continue reading

Tagged , , , , , , ,