New House

 — 

The idea of the new house started when we moved into the old one. It was a concept, an idea that we joked about. "Well in our next house we want… "" and then we would chuckle. I mean there were things that we didn’t like and so we changed them. We got rid of some dark, 1970’s chic and made some more space.

Then it became less of joke as years went by. “There are too many steps to get into this house” and “It’s a long way to carry groceries to the kitchen” and “our backyard is too big” and then there was “these rooms are so small.” There were things we could do and we did a lot of them — but frankly we couldn’t move the garage closer to the kitchen. Or take out the steps to get into the house. But we dealt with it. And did more stuff… we redid the kitchen! We redid a bathroom! But still the laundry room is off the kitchen. And the kitchen is floor and half a house away from the garage.

We made a list of what we wanted. Zillow weighed heavily in our browser history but we didn’t like what we saw. Not enough hit the must haves. We had a realtor come and he gave us a list of things to do to sell. Another bathroom changed! New flooring! Lots of things move out! And we cleaned. But Zillow still didn’t show us anything we were happy with.

But then Zillow started showing up some brand new houses… “Hey this is done, why not look at it?” So we walked through a couple model homes.. hm, close but not quite. We drove further to walk through another model. Wait… this.. is perfect! Big rooms! Nice basement! Smaller yard! No deck! Laundry by the bedrooms! Um… so… we are going to build. Never our plan. Building was always a ephemeral idea and then became permanent. Contracts were signed, money changed hands… and an old house was fixed. Or tweaked. And then put up for sale… and quickly purchased.

We moved to an apartment…cozy but comfortable. And we go to our patch of dirt and see progress. And hey we do see progress.

Category: misc Tags:

Puzzling

 — 

It was a long time ago when I first discovered Sudoku. I do remember it well… I had a long flight ahead of me and this was before I had a smart phone..I had some books (like printed) but wanted something else in case the books made me lose interest. I picked up a book by Will Shortz and made sure I had a couple of pencils with me. I'm not going to say I was good at it, but I enjoyed it and it helped whittle away the hours (yes, hours) of flights I had.

I toyed with it off and on for years but waned in my interested of it. Fast forward to last week and I saw someone mention that Microsoft (yes, that Microsoft) has a good mobile app on both Android and iOS, so I put it on my Android phone and took it for a spin. And hey I really liked it – and I was better than I remembered being! Oh and then I tried a hard puzzle and that humbled me a bit. There were ads on the MS version and I didn't feel like paying a monthly fee to get rid of them. And it was small on my phone screen. Oh, but I have an iPad…

After some research I found lots of people like Good Sudoku. As I loaded it up and noted it was by the same developer as Spelltower, another game I enjoy, even though I really don't always like word games. And Good Sudoku is aptly named – and it has taught me how to get better. At first I thought the first few puzzles were hard (certainly harder than MS's version) but then I realized I was playing Advanced puzzles… oops. So I went to the beginner and played a bunch, and then went into the tutorial where it talked about note taking. That really helped my Sudoku game. Now I see more patterns, how to utilize notes, etc. Of course, now it's hard to go back.

So, if you need something to occupy your time during Zoom meetings while zoning out to TV, why not fire up a Sudoku app for a bit?

Category: misc Tags:

Working the cloud with rclone

 — 

TL;DRrclone truly is the Swiss Army knife of cloud storage and you should look into it if you have to deal with that world at all (S3, DropBox, OneDrive, etc).

In the past I really had an addiction to Humble Bundle, where I bought a lot of cheap ebooks and comics. I dutifully put both of these into Calibre and then put it from there into my devices. Now for epubs to my e-reader, it was pretty easy. But it was quite a bit hard for comics. Eventually I forgot about all the comics.. until I bought some more. And then instead of just putting them in Calibre I put them into a folder in my pCloud storage. Then I find Panels, a really good Comic app for the iPad. But downloading a file from pCloud and then importing it into Panels was painful. I saw that the commercial version of Panels offered integration with OneDrive, GDrive, and DropBox – but not pCloud. Well I have a OneDrive that I haven't used… maybe we can move my files there? Oh but I struggle with pCloud's macOS client when I copy or rsync a lot of files out of there. It simply crashes. So I can't do all the work locally.

So that is the setup… I've had rclone on my watchlist before and mucked with it a few times but nothing serious. Well this seemed like a good way to learn about it. First I had to setup both pCloud and OneDrive – that was pretty easy. I naively decided to run a cloud-to-cloud sync, thinking that it would bomb. I was pleasently surprised! The command was:

rclone sync "pcloud:comics" "onedrive:comics"

I did this about 6pm and it finished about 11pm. I didn't think that was too bad. Oh and Panels was able to read my OneDrive and download the comic file just fine. Fantastic!

The next day I was wondering about the gigs (yes I said gigs) of other comics I had in pCloud (where I back up my Calibre) library. So I decided to copy those out of pCloud and into OneDrive

My comics are all in cbz format so I essentially had to find all my .cbz files. With rclone, this was pretty easy:

rclone ls --include "*.cbz" pcloud: > file.lst

I could have immediately copied the files to OneDrive instead of making a file list but I wanted to change the directory structure from what Calibre used. For example, I didn't want comics/My Books/Unknown/starwars legacy vol1 1412979773 (18)/starwars legacy vol1 1412979773 - Unknown.cbz but (an attempt) to do comics/starwars/starwars legacy vol1 1412979773 - Unknown.cbz. Also I really did not want to re-copy the files already existing in comics. So I wrote a quick and dirty Python script:

#!/usr/bin/env python3

from pathlib import Path
from string import Template

rclone_cmd = Template('rclone copy "pcloud:$infile" "onedrive:comics/$dirname/"')

f_list = Path("file.lst")

with f_list.open() as fp:
    for line in fp:
        size, name = line.strip().split(" ", 1)

        if int(size) < 0 or "comics/" in name:
            continue

        new_name = name
        if name.startswith("My Books/"):
            new_name = name[(len("My Books/") - 1) :]
        if " " in new_name:p
            prefix, junk = new_name.split(" ", 1)
            dirname = prefix.split("/")[-1]

        outname = name.split("/")[-1]
        print(rclone_cmd.substitute(infile=name, dirname=dirname, outfile=outname))

The result didn't really give me a directory structure that I wanted, but close. I figured I could change it manually but what I had was a good start. I also could have ran the rclone copy command in the python script, but I wanted to see the finished commands them all. So then I captured the output of my script, and then I basically had shell script. I kicked it off before bed and it finished long before I got up. And everything was copied!

So yeah… everything I wanted to do I was able to with rclone. I for sure will keep it in my toolbox.

Category: tech Tags:

Video Games as Art

 — 

Been thinking a lot lately of the current state of video games.. I'm not sure why. Technically, we own an XBox One but my son plays on it mostly (or, er, most of the time) and I've dabbled a bit in other games, specifically Minecraft and Stardew Valley, which in some ways are similar – both are pretty open and you can kinda do whatever you want. Stardew Valley certainly has a linear story and it has much less variation but it certainly has a lot of charm (and hey, it's still being developed, as well as Minecraft). I don't spend a lot of time with either one of late but I go back and forth. Since video games are at least on my periphery, I do keep up on an eye on the big news so I had to chuckle when Cyberpunk 2077 didn't live up to the hype. But of course it couldn't.

I don't really care for AAA games – mostly because it takes 20-45 minutes to actuall start (sometimes longer) and I don't have long gaming sessions to begin with. Add in the grotesque, sex and language they tend to put in (and I'll say it) the same thing over and over again. Another thing I can't stand is when it's really a conceit. My son and I played Human Fall Flat because the controls are stupid. Maybe I'm an old man.

What I have discovered is that I like smaller, more independent games. They try to do things different and maybe they fail at it but at least it's original. Sometimes they have a story, sometimes they don't. Minit is a good example of this. It looks like it was ported from the C64. And it's basically a puzzle game but you only live a minute but one you do in one "round" carries over to another. Clever, fast, and kinda hard at times.

This summer I've bought into itch.io's Bundle for Racial Justice and Equality. Mostly because I figured that I would easily get my money's worth and also because I supported it's cause. Some of the games I had heard of (like Minit, which I had played before and Celeste, which is a very humbling plaformer). Few of these games rival a AAA in story and graphics, but the ones I have played are a lot of heart. Take, for example A Short Hike, a game I would have never heard until I bought the bundle. I've played it throught twice and may do it again… and I never take the time to actually finish a game! But it's sweet, with a fun little journey and story. Another one (and game I should get back to) is Signs of the Sojourner, a RPG/interactive story with a card game in it. And part of the game is to figure out when to win and when to lose.

Ironically, I have played none of these games on my iPad, which is certainly my main "gaming machine". Regardless, this started going through my mind as I'm playing Florence on my iPad. For a game, it isn't much. In fact, I'd say it's more of a story with easy puzzles (literally jigsaw puzzles a lot of the time) as you go along. But the story is so very well told… I was engrossed with it and how they told it. Another example is Gris, which is certainly more involved than Florence but certainly more art than game. A few years ago I was really into 80 Days, which is a re-telling of Eighty Days Around the World. It's not far (or hard) to get around the world, but there are so many paths to take that when you do it, you start again! And then probably again!

I guess this rambling is – I like story. I value story over form. I like many tasks, open world.. but if it's going to be a story, then make it a story!

Category: art Tags:

Streaming TV Shows -- COVID edition

 — 

As this crazy year closes, my wife and I were chuckling about how many TV Series we binged while in isolation. We started more than we finished – if one us is isn't totally into it, we have no problems in stopping. These are the ones we liked the best. This doesn't count movies, just TV series.

In any order:

  • Tiger King (Netflix) – like who didn't watch watch this at the beginning of quarentine? How lucky could Netflix get then to get a docu-series about crazy people in a weird American subculture just when we needed it? Not the best docu-series ever but worthy of the cultural phenom it became and the perfect show to make us laugh and cringe when we needed it. (B+)
  • World’s Toughest Race: Eco-Challenge Fiji (Amazon Prime) – so crazy-man Bear Grylls decided there were other survivalist crazies, so he made a course in Fiji for them to race on. The best part of this series that they didn't just follow the leaders but other people way back in the pack with intersting stories. It was impressive… but these people were crazy. (A)
  • The Crown (Netflix) – a show I didn't expect to like but I really do. It's a slow burn but everything is well done – acting, costume, scenery, script. I don't care how accurate it is, but it's probably accurate enough. There are a lot of great episodes but I think my favorite is "Moondust" from S3. (A+)
  • How to Get Away With Murder (Netflix, now) – I wanted to quit this after Season 3 because that season was a diaster – I felt the writers didn't have enough story per episode, so they filled time with sex scenes. But we kept watching Season 4 because they left some things hanging and they somehow found good writers. Anyway the premise is good and Viola Davis is downright amazing in her main role as a diabolical law school professor. Lots of great themes like loss of innocence, sexism, childhood trauma. But sometimes the characters are kinda dumb and it probably goes a season longer than it should have. (B-, D+ to Season 3)
  • Big Little Lies (HBO) – We don't have HBO but sometime in quarentine HBO was giving shows away via Amazon Prime. Season 1 had a brutal display of domestic abuse and a great "Well what happened?" to it. It was impossible to carry that on to Season 2, but exploring more characters on the fringe and the aftermath of what they did in Season 2 (instead of creating something else) was an excellent way to go (A, Season 1 was A++)
  • Outer Banks (Netflix) – What starts out to be a teen drama turns out to be an adventure show more akin to Indiana Jones than Gossip Girl. It took a while to get there but when it turns, it was worth it (A-)
  • Schitts Creek (Netflix, well now) – techncially we haven't finished this yet but we will – and will probably watch it all again. Our favorite comedy since The Office. It deserved all it's rewards. And if you love the show like me, then you need this site. (A+)
Category: misc Tags:

Webfaction to Netlify

 — 

It was funny – the day after I finally put up a blog post I got an email from Webfaction that my account was closed. That was funny. I mean I knew they were migrating sites and I had a couple of old Django playgrounds on there, plus my person blog generated from Pelican. I got the emails over the past couple of months that my Django sites (and their pgsql db's) weren't migrating and I was fine with that – they were ideas that didn't go anywhere. But I was surprised that my account was closed. I check my blog – nope, down. It seems that they didn't move anything of mine. I then said some non-professional phrases, and continued back to my day job, thinking of a plan of action in the back of my mind.

Important to note that I hadn't lost any of my content – my files were still there, I just needed another place to put them. I played around with Netlify once, just to see what all the fuss was about and I did like it. I figured I could move my content over there pretty quickly. I was already using GitLab to store it (and my personal projects) so I figured it wouldn't be too hard to just move it over. I started working on it when I had some free time and went down quite a rabbit hole.

I didn't like having to move the DNS over to Netlify's control, but I understand what they are doing and Netlify controlling the DNS makes this possible, so that wasn't too bad. I made a requirements.txt of my simple Pelican area (under a venv ) and that was good to go. I checked that into my private gitlab repo, which I had already setup Netlify to monitor and it saw it and built it. Well, not really. It failed miserably. This was where things started to get even further off the rails.

First off, Netlify's default Python is 2.x. Yes, still Python 2, even though it's been sunsetted for almost a year now. They do have Python 3 – to use it you need a file called runtime.txt with simple 3.7 (or whatever version of Python 3 you need). Note – not python3.7, just the version number.

So once I got that going, I saw that the deployment was successful! I went to the URL… and it was blank. I looked at the Netlify log and I had a bunch of Emacs errors. You see, previous setup was to write my content in Emacs with OrgMode. I used a Pelican plugin called org-reader to convert the files to HTML on deployment. Locally, I just used a Fabric task to generate the static files and sftp them to Webfaction. I did everything locally, and just copied the HTML to Webfaction. Well now I'm relying on Netlify to do the build and copying. What was weird is that Pelican wasn't existing with an error when Emacs bombed out on each org file.

I was able to determine that Netlify was using Emacs 25 and I was on 27.1 locally. That is kinda old but there was no way to change what Netlify had – I wasn't allowed to run apt install there (permission denied). After beating my head against the wall a bit, I decided to look for another Pelican plugin. What I found was org-pandoc-reader, which really could work well. It obviously uses Pandoc, which I have used before and it works really well. I first used the plugin locally to make sure it could handle my existing org files and it did with no problem. So, just assuming that Pandoc was there in Netlify, I committed and pushed. And in a few seconds all my content was there. A good side effect is the Pandoc renderer is faster. I think it takes multiple org files in on one command and my Emacs also loaded my full initialization when running org-reader (which I could have fixed.. but still wouldn't have worked on Netlify). Locally this made rendering the pages when testing a lot faster.

Take-aways:

  1. While it was painful my host went away and closed my account, I still had my content in pure text. So I could put it anyway… there are more places I can put it besides Netlify. If this didn't' work I could have made another choice, like GH Pages, AWS S3, etc.
  2. Netlify is pretty open about what they provide… You can even see the Dockerfile that they use to build and deploy content on. This was invaluable to me
  3. Not mentioned above, but I found it handy to put the build commands in a script (which I wittily called netlify) and put my Pelican build command there. This allowed me to easily add other commands to it (like emacs --version) to help troubleshoot what was going on.
Category: misc, tech Tags:

2020 -- The Year of Taking Notes

 — 

Hey it's December and it's my second blog of 2020. Almost a year since my last update. Let's not talk about the strange year of 2020… sometimes I do an unintentional Big Thing(tm) for me, learning-wise or tech-wise of the year. A few weeks ago I figured out what 2020's was and why not share it now?

I've never been really good at taking notes before. Not really sure why. Some of it was stemmed from "Sure you can write it down but you will never find it when you need it" and some other was "You fight the tools to do it well."

There is a concept called Zettelkasten that is becoming very popular. I suggest you read that article or this one to get an idea. You can google the Zettelkasten name yourself and see what is out there, what tools are our there. If you want a good book to convince you more and more details see How to Take Smart Notes by Sönke Ahrens . I'm not going to get in the nitty-gritty details of how to do it (because I'm not sure I'm doing it well) but simply a note should have three things outside of it's content:

  • tags
  • links to other notes
  • A title to find

It took me a little bit to find my own system to make it work for me. I declared bankruptcy on my Emacs config and started using Doom Emacs. Doom make it easy to install Org-Roam, which is a re-build of the Zettelkasten system Roam built on top of the ever-powerful OrgMode. I use Deft to quickly lookup notes.

This is all fine and good on my Mac but I'm not always on my Mac. What if I find something I want to remember while reading on my Android phone or iPad? this is Trickier. If it's just an article I want to read (again) later, I add it to my Todoist. If it's something I want to remember… well sometimes I still add it to Todoist with a comment and add it to my Org-Roam later. On my iPad I've started using (and paid for) Bear to write notes into. I think (usually) copy the notes out of Bear and into an Org-Roam note later. Bear is really a joy to write with – it gets out of my way, let's you (or makes you) do Markdown, and generally does the right thing.

This is all about implementation and workflow, which I will admit isn't great and is evolving. But the idea of Zettelkasten is great for me and while the literature talks about it for writing, it's really useful for all knowledge workers. If I figure something out in the application that I'm writing, I make a Org-Roam note about it. Or something I want to try, I make a note (and generally a Todoist item to revisit it eventually). And if I run into something, I looked my notes before Googling around about it. And hey sometimes I write a note about "Look how cool X is!" and then later I figure out it isn't go cool, so I make another note how I fixed it and make sure that links to the original and then edit the original to say "hey use this instead".

Basically, little by little, I'm making my one Wikipedia, but better because it has my own thoughts and opinions in it. I'm not terribly picky about what I put in – technical, other soft-skills reading, etc. As Ahrens said in his book:

Working with it [Zettlekarsten] is less about retrieving specific notes and more about being pointed to relevant facts and generating insight by letting ideas mingle. Its usability grows with its size, not just linearly but exponentially. When we turn to the slip-box, its inner connectedness will not just provide us with isolated facts, but with lines of developed thoughts. Moreover, because of its inner complexity, a search thought the slip-box will confront us with related notes we did not look for. This is a very significant difference that becomes more and more relevant over time. The more content it contains, the more connections it can provide, and the easier it becomes to add new entries in a smart way and receive useful suggestions.”

So really, the bigger the better. Personally I looked up five different notes together to write this article.

The thought came to me the other day how different I have become to notes when I was working on a church Bible Study, Book in hand, iPad on my lap. The iPad is in split-screen with Bear on one side and the Bible passage on the other, ready to take notes. The Mike from last year would have squeezed his answers into the fields but now he wants to keep them later.

Category: misc Tags:

My Uses This

 — 

This year I've discovered the blog Uses This and I'm fascinated by it. Since I will never be on there, I decided to roll my own. As I started thinking about it, I realized that I kinda have something like it, at least describing my current development environment so maybe I will just allude to that when I get there.

The hope is that maybe others will post the same type of thing in their blog. I just find it interesting. Maybe I'm just weird.

Who are you, and what do you do?

I'm Mike Hostetler and I'm a Principal Consultant at Object Partners, which is probably the best place to work for my current station in life. Historically I've been doing Java development but now I'm living in the world of AWS, Python, and NodeJS (if I have to). Since Python is my favorite programming language, I'm ok with that change.

What hardware do you use?

My employer issued me a MacBook Pro. I like the CPU and memory but ignore the Touchbar and dislike the keyboard. A lot. While working, I usually have it closed and hooked up to a monitor.

Through work, I won a pair of Sony WH1000M3 headphones. It's both Bluetooth and noise-canceling. I would have never bought them for myself but I really love them. I use them for calls as well as having them on for deep-work. Before I used a $30 pair of MPOW headphones – still decent sound, longer range, but not good for calls. Not noise-canceling but it filters out a lot.

At home, I use a Das Keyboard, which I have a love/hate relationship. I love the feel of it, and the keys, and it's sturdy. But sometimes I accidental press a key a little bit and the keyboard sees that as a press. But I haven't found a keyboard I like better. I also have a cheap Bluetooth keyboard from Anker that I port around that works surprisingly well. I had a co-worker suggest a Magic Trackpad 2 and I like it more than I thought I would.

Personally I tend to not upgrade my tech very often. I have a Samsung Galaxy S8 phone and a Samsung Galaxy Tab S2 tablet. I use the phone for …, well, communicating, and use the tablet for games, reading and research. I read a lot of novels have really like my Kobo Aura. Why a Kobo instead of a Kindle? Better integration with my local library and I like the epub format more than Kindle.

And what software?

If you know me very well or frequent this blog, I'm a big fan of Emacs. I won't belabor this point because I've already stated my opinion. I would say there is no such thing as an "Emacs tourist."

So besides that – what other software do I use? For browsing I moved back to Firefox and don't regret it. It was the announcement of the Multi-Account Container add-on that sent me there and I don't regret it . I now use it on my tablet and my phone with syncing, etc. I have things locked down tight with uBlock Origin and Privacy Badger so sometimes a site I need doesn't work quite right, and I have to use Chrome. But most of my browsing is done in Firefox and I like it.

For my todo-list, I'm currently using Todoist, which I've come to really depend on. The Premium version is worth every penny. My favorite Todoist feature is email forwarding – I can forward an email from my (or any) inbox and it will immediately appear in the Todoist app, with my email as an attachment. I've found this really handy for movie tickets, store coupons, etc. There are a lot of integrations with Todoist and plenty of other features. If you want to if you want to try Todoist Premium, click this referral link. I don't think you will regret it.

Other software: Keybase for my private git repos, KeePassXC to manage my passwords, Swinsian for my music collection, Inoreader for blogs, Shift for all the GMail accounts I have to manage, and pCloud to keep my important files in.

What would be your dream setup?

I sometimes think that I would be just as happy or happier with a stronger laptop with Linux on it instead of a MacBook Pro. None of my software I used for development needs MacOS and most of the other software (pCloud, Todoist, etc) work fine on Linux or have good alternatives. And yeah it would have to be a laptop because I really like the portability.

Category: tech Tags:

New Tools for an Improved Workflow

 — 

Kasim Tuman recently wrote that Emacs is like a workbench. It evolves as you get better with your work – or changes as your works changes. I think that is a great metaphor of not just Emacs, but software development tools in general. So this post is about my evolving workbench. My workflow has changed a lot in the last few months to a year because of different tools I discovered and have put into practice. This came as I switched from Java to Python as my primary language. Some of these changes are Emacs-related and some are not. Yet everything kinda coalesces together into one harmonious system and suddenly things become a lot easier.

As I said above, I've been using Python almost exclusively in the past year. I haven't fired up Intellij in months and, frankly, I haven't missed it. Yes a full IDE would give me things like refactoring support but in Emacs I can open up many files and look (and switch to them) with ease – something that Intellij never did for me. It's effort in the JetBrain's world – in Emacs, I do it with muscle memory and routinely am looking at 4 files at once. One time a co-worker was working with me on something and I quickly deleted some files with Dired and he stopped talking. I asked him if I messed something up and he said, "No I just saw you manipulate files while inside Emacs and I'm still recovering from that."

Anyway my independence from Intellij has freed me up to explore other tools to help me with my software development work and I like what I have built up.

Docker

Just as a development tool, things get a lot easier with Docker. Setup a docker-compose.yml file for a database and another other extra services for my projects and suddenly I have a solid local development environment where I don't have to sweat if it will work on a server. You can setup multiple services in one Docker file (I had PostgreSQL and RabbitMQ in one file, for example). It's really as easy as a google search for "docker <service you want>", click one of the first links, and put their snippet into a docker-compose.yml file, and then run docker-compose up -d.

tmux

Tmux has been in a my tool bench for a long time, but I have started using it with a renewed fervor. Mostly because I have 2-3 projects (if not more) going on at once. It's hard switching CLI's back to that and having a config for it. direnv helps a lot, but doesn't give everything. I found tmux-ressurect, which saves the state of my Tmux prompts. So now when I need to switch a project, I just go to my Tmux-powered prompt and switch. Forced to reboot? I just start Tmux and run my tmux-ressurect command (Ctrl-\ Ctrl-r) and I have everything back from before the reboot.

I will say that I've been using the zsh less and less lately, mostly because Projectile has been taking most of my shell usage away from me. I have been using eshell a lot lately and that is good enough for simple things. The Emacs terminals like ansi-term just fail on REPLs, etc. I played a bit with the vterm module and it shows promise but has a ways to go for my usual workflow. I like that tmux is always there and switches contexts with few problems. It's hard giving up years and years of aliases that you are used to. See my tmux config to see how I set things up.

direnv

If Emacs is my IDE, then direnv runs my config file that the IDE reads. So as the .idea folder is for Intellij IDEA, so is my .envrc for my Emacs/shell setup.

I use direnv for project-specific environment variables (like AWS_PROFILE and even custom PATH). But you can do more than that: I talked about this on my employers blog but I use it to manage my Python environments as well. It took me a bit to find it, but emacs-direnv makes Emacs read it and follow it. Then Emacs knows all about which Python environment I'm using. That makes a lot of things easier. All I have to do is open the project in Emacs and poof it's pointing at the proper Python environment. My only real complaint about direnv is that it doesn't have a parent structure – that I can't declare environment variables on the top level (like AWS account info) and have that go into the direnv-enabled folders below. Recently I started doing source /path/to/some/common/file and that works – you need to use the fully-qualified name to make sure it works. Not quite as nice as just using a parent folder, but it works really well.

Emacs Stuff

Yes, Emacs needs it's own list of things. This part of my workbench is always evolving but I got into a group of tools that have been fairly consistent lately. You can see my Emacs shortcuts here, which give you an idea of what kinds of things that I use.

Projectile

I've had Projectile in my Emacs config for a long file, but haven't used it until the last eight months of so. It has now become the general way I interface with files and buffers in Emacs. Everything is a project (which is easy – it just has to have a .git folder in it). Then I can find files in the project, switch buffers in the project, search files in the project, and compile (or run) the project from any buffer opened in the project. This integrates with ease with direnv and Helm. So, I can find a file in the project via Helm and the search project results buffer is also in Helm.

Let's also not forget that Projectile comes bundled with Prelude, which is a really nice little Emacs starter. My favorite part is that you can put your own Emacs configs under ~/.emacs.d/personal.d where you put your own configs… not having my mess with the main Prelude/Projectile part is nice.

Helm

My newest Emacs addition and, honestly, I'm not sure how I got by without it. I tried to use it before but I didn't get the hang of it. As I mentioned above, Projectile can use it and that got me going with it again. Now I flip through buffers and filenames with ease. So easy to switch to another file. And the interfacing it with M-x to find functions is great I find useful functions I didn't know existed – like pytest-one and pytest-all, which now I use all the time.

Magit

When I first started using Magit, I found it confusing and didn't know what the hype was about. I stuck with it, and figured out how it was structured and the way that it wanted me to work. I found that it's way of dealing with git was smarter than my way. It has now became my preferred way to deal with Git – not just committing, pushing and fetching, but also looking at logs and branching and everything else. I never would have believed I would have given up the command line with git, but yet I have.

Closing

I'm enjoying this freedom from in my current set of tools. I find it much quicker to get a lot of things done, switch projects, etc. Some of these things have been kind of "set it and forget it", which is nice until you need to setup it again.

A big question – how will this work when I go back to Java development? Not real sure that this setup is good for 100% Java… but I could see myself using both this sort of setup with Intellij… use the strength of both. Of course, maybe I will find a different list of things to be using a different list of tools from this list by then.

Category: tech Tags:

Literate Dotfiles

 — 

For several months, I've been converting a few of my dotfiles into OrgMode files and using tangling to generate the config file and the same file generates HTML documentation. The point was to always publish them – and I finally have. See the HTML version or the github project. Note that the Org files are rendered in Github because Github is smart like that – it treats them the same way that it does with Markdown.

I stole, er, borrowed the system from Toon Claes. And, yes, I have had to edit a Makefile to do this.

I found this documentation on my files to be more useful than I thought. Besides just the documentation of "why is this here" but it also helps in "why am I adding this?". Because the ultimate source is an Org file, I can do a better job documenting why I did something in the file then in the comments of the file. I can (and really should) link my config file to my OrgMode-powered knowledge base about what each thing does. That doesn't give the Internet reader much help, though. But is this documentation more for me for them? That I'm uncertain about.

So why call this "literate"? It's not my word – it's Donald Knuth's. Basically it's keeping the documentation and the code together. Wikipedia has a good overview on it.

I already repeated a lot of links from the Readme of this project. Hopefully these files are helpful to someone.

Category: tech Tags:

© Mike Hostetler 2016

Powered by Pelican