Nothing like doing a
brew upgrade and watching everything on your machine crawl to a stop because you have to recompile
gcc. I think I’ll kick that off again next time I’m out of the house for three hours.
Programming (/life) pro tip: if you can’t see the value in a pattern someone else finds useful, assume you have something to learn, instead of concluding that the pattern itself is useless.
I was fed up with JIRA, and then I remembered that I have Bee. And I’m so happy I remembered, because it’s good.
Growing a Language, by Guy Steele is without competition the single best technical talk I have ever seen.
One big personal upside to this documentation project: I’m going to know Rust a lot better before I’m done.
A thing I just learned:
cargo doc --open: full, local docs for every dependency your Rust crate has.
Trying to get set up with Jamon Holmgren to live-stream some pair-programming.
This is not a solved problem. Good grief.
Final solution (so far) includes both Screenhero and Hangouts on Air. :headdesk:
That got us most of the way there; now we’re actually using Hangouts+Zoom. This. is. bonkers.
However, I have to say: it’s painfully obvious to me on macOS that Code is developed by people who aren’t Mac-native. Atom is.
And that’s okay—but it means that as many things as I like about Code over Atom, it always just feels a little off to me.
Ultimately, what I want is the extensibility promised by both Code and Atom, but with actually native UIs and native performance.
So on that note… @raphlinus, how’s XiEditor coming along? Because its approach is what we all really want, I think.
And he replied!
@chriskrycho I've been focused on porting it to Fuchsia, less lately on the core or Mac port. I expect to get back to those soon.— Raph Levien (@raphlinus) December 27, 2016
Setting up AppVeyor for Lightning so I can be sure everything works cross-platform. 🎉 But for the record: batch files are barbaric. 👎🏼
This is fun: Lightning now loads the YAML configuration I defined. Doesn’t do much of anything with them, but it loads them!
(I’m developing Lightning totally in public, so you can follow along here.)
Your friendly reminder that docs.rs is an incredible piece of software that is invaluable for working with Rust.
Things VS Code still needs to fix to be awesome:
And let me turn off the ridiculous smiley-face feedback icon!
To be clear: Code is already very good. But it’s not quite awesome. (It’ll get there.)
I had gotten in an insane state where things just stopped working that had previously been working as I updated to Ember CLI 2.6.
After much tearing of hair, I started over from scratch and repeated the upgrade process.
Everything works now.
rm -rf node_modules bower_components and test again.
Nothing works now.
Consistently, it works fine after the upgrade and
ember init finishes. Then, if I do a clean install of the dependencies, it fails.
And it fails in the same ways. So ultimately I’ll be chasing those, because we’re not going to get stuck here.
But this is an infuriating experience. If you’ve ever believed npm’s claim that non-deterministic installs aren’t a problem… consider this a data point in the opposite direction.
┻━┻ ︵╰(°□°)╯︵ ┻━┻
Currently almost 7 hours into this work- and school-day, at 2:30pm, and expecting it to be about a 12-hour day. Time to coffee up some more.
There’s nothing like building something real in a language to find all the weird little corners. Even something small will get you there.
Pro-tip for dealing with
HashMaps in Rust: the
entry API is often your friend.
Lots of compilers tell you “Foo is broken!” I love that both the Rust and Elm compilers try to explain why and how to fix it.
One of the things I most enjoyed working more on Lightning this weekend: the Rust compiler is so helpful.
The one upside to tabs (over spaces): they can be whatever visual width you want. (Relevant when, like me, you like a really unusual width. I’ve always been a 3-spaces-wide guy.)
Pro tip: use
Map and not
Edit: Belay that: the problem was an allocation-speed issue: I wasn’t reallocating a
Map. Updating in-place is much more comparable.
Front-end web development in one screenshot: macOS Safari on the left, iOS Safari on the right.
Using ML-style types to reason through things—even just as a reasoning tool, without language support—makes such a huge difference.
I’m rewriting a hairy, often-buggy section of HolyBible.com’s user logic, and using type definitions for reasoning was invaluable.
Just used LetsEncrypt for the first time.
This is wonderful. ENCRYPT ALL THE THINGS!
And then I set up a cron job to renew it every three months. My maintenance burden for this app just went waaaay down.
Spent a good chunk of the evening working on this static site generator—by contributing to another library. #opensource software FTW.
Discovered that Syntect can do highlighting for HTML as well as for editors. More Rust awesomeness.
It looks my options for HTML templating in Rust are… quite varied. This is good!
Curious: I noted during my drive back from vacation today that whenever other conscious thoughts lapsed, my Rust CMS project came to the fore.
My online writing needs are weird. I have searched for years, and unfortunately… I need to write a custom CMS.
I thought briefly about hammering together what I need with Metalsmith.io and its plugins. But that would be a stopgap.
So the inevitable comes to pass: I commit to, however slowly, build the CMS I need.
Probably in Rust—so it should be crazy fast.
Status: looking at C bindings for Pandoc and thinking about implementing a Rust wrapper for libpandoc vs. shelling out to pandoc. 🤔
First pass: just going to shell out on the command line. Second pass… well, if speed is what I’m going for…
I’ve guessed this for a while, but I can confirm it now: Clap is a really fantastic command-line argument library.
For posterity’s sake (ha!) it’s worth note that the original link here was to
lightning-rs. I actually noted as much, writing:
That repo name is for “Yet Another Static Site Generator (This One’s In Rust)” because I feel so creative today.
Note the headdesk-worthy initialism failure: it should have been
People, React is great—truly! But the fact that you only learned about the ideas it uses from React doesn’t make React itself the paradigm.
People, React is great—truly! But the fact that you only learned about the ideas it uses from React doesn’t make React itself the paradigm.
After two years of using a Garmin 920XT, my considered opinion is: Garmin makes great hardware, and their software is utterly mediocre.
My kingdom for an IDE with the smarts of JetBrains’ IDEs and a real, non-Java, native UI on macOS.
I hate JIRA’s Wiki markup so much. Why in the world they feel the need to stick to that instead of just supporting Markdown, I do not understand.
I’m quickly discovering a desire for actual, enforceable types as I’m trying to compose a series of functions. It’s hard without them.
I’m so used to dealing with layout distinctly from behavior with the HTML/CSS/JS separation that learning how to lay things out in macOS apps feels weird.
I am trying to fix a bug in a Node.js back end I wrote 18 months ago. And I have never been so tempted in my life to rip out the entire Node back end and replace it with one written in Rust.
Things I did tonight:
I really, really prefer codebases which remember that readability matters. Getting everything on one line, at the expense of the line being 234 characters long, is not a win.
Open-source developers who are still using mailing lists for tracking bugs are not on my good list. sigh
I haven’t gotten almost anything done today. I think I’m calling today my day off for this week and I’ll hammer at productive things later.
Wow: a minimal (but extremely useful) lodash install is only 4kb minified and gzipped. I… need to have this available to use everywhere now, please.
Doing the same little programming task again at regular intervals is a fascinating exercise. Seeing how you’ve learned to tackle the same problem, but better, is illuminating.
I know the
Vehicle example is sort of canonical in teaching object-oriented programming. But it’s wildly disconnected from real software development problems. I don’t like it.
I’d love—love—to see an open standard for embedding browser engines (a la Chromium/Electron) emerge, so you can embed whichever you like.
The build worked on
develop last night. We have made no commits. Now it fails.
Current best guess: transitive dependencies. Thanks, npm.
The first thing I do when I start playing with a new language/framework/etc. (like I just did with Elm) is download the Dash docset for it. The time it saves is extraordinary.
Got a weird diff report on a change in GitHub. Tracked it down to find it was a byte-order mark issue.
Thanks, Windows. I hate you.
Also, to be fair, Sublime Text 3 gets a little of my ire for changing the encoding on the fly. Don’t do that.
Lambda calculus. Church numerals.
This is my reading for a day when I feel terrible and just need to rest. I note and embrace the oddness.
When looking at an intimidatingly large software project, just ask: what is the very smallest thing I can build that is still useful? Once you have that, you can build on top of it, and you’ll have momentum. You might rework it later, but that’s okay—you’ll have started.
So I have a week off, and what have I spent this afternoon doing? Uhh… working on some of my personal development tools, mostly. What can I say? It’s fun!
Time zones: the bane of a software developer’s existence.
P.S. I wrote that post on my iMac via SSH from an airplane somewhere over the Midwest. Crazy
I needed to write a tiny server to test out some quirky single-page app stuff I’m doing for Olo right now. So I did it with Python and Flask.
Just bumped into another person who (quite reasonably) didn’t know that ES6
classes are just syntactic sugar for prototypes. I like classes… but they’re more confusing than not, I think.
I just had one of thos beautiful moments when I realized I’d written a beautifully generic component I could reuse throughout the app, and it made me so happy.
I think I’m sold on fish. The autocompletion alone is just delightful. Need to tweak it a bit, but even its defaults are pretty great.
I hate npm’s non-deterministic installs. Reproducible builds are essential, not optional.
After a few months of using Hasklig, reading code without code ligatures seems really weird to me.
Just finished a massive cleanup of about 4000 lines of an AngularJS codebase. It’s not amazing, but it’s a heck of a lot easier to deal with now.
I still love EmberJS—but if I have one complaint, it’s that it’s slightly too heavy on convention-based magic. I want it to be a little more explicit, so that I can have a little more insight into what it’s going. Yes, even if that means a little more boilerplate. Explicit is better than implicit.
On fire this morning: just knocking things out left and right.
I love Mondays. I’m well-rested, mentally fresh, and excited about the week.
My Windows VM for work is now stuck in an endless cycle of reboots after a blue screen of death after an update.
Between that and its starting the update without asking me, I’m not feeling especially happy with Microsoft today.
Basically: an ML, I guess.
Betting I’m not the only one who thinks it a little weird that the
Event.target in the DOM APIs is the source of the event.
It is utterly infuriating how many parts of the DOM API are “array-like” but don’t have the basic
Array API actually attached. Want to iterate over a
HTMLCollection? You get to use a
for loop with an index! Lucky you! 😐
Oh. my. goodness.
How have I not used Emmet before? The experience is amazing. Mind. blown.
Good tools are good.
Why isn’t this updating? :looks around for five minutes: Oh. It’s because I’m just serving an old version, and don’t have it rebuilding as I make changes.
Oh, the difference between Friday afternoon and Monday morning, when trying to solve a problem. Spend two hours beating your head against a wall on Friday, or ten minutes on Monday morning. So it goes.
Throwing this out there: don’t organize your apps by ‘kind of item’ (view, controller, etc.). Organize by concern. A component’s template, controller, etc. should be right next to each other.
Well, paper-writing today may have pushed me to the breaking point. An app idea that’s been bubbling for months… I think I’m going to start actually building pieces of it and learning for other bits this week.
Tip: if you get a very specific piece of feedback and have a standard workaround, it probably means you have a product design issue to fix.
debugger; is a thing. My life would have been so much easier if I had known about this sooner than ten minutes ago.
Pro tip for tracking down oddities with Ember.js during testing:
ember test --serve --filter '<some pattern>' is great. E.g.
ember t -s --filter 'Unit' for just unit tests.
Pro tip: if you want to use Sublime Text with any project which has local node_modules, install something to ignore specified directories (e.g. those in your gitignore) immediately. Same goes for anything with large, repeated builds (like Ember CLI). Yeesh.
Sites which rely on Adobe or Google Tag Manager for their basic functionality infuriate me. Stop. Just stop.
Seriously. All I want to do is transpile ES6 to ES5 and make it runnable in browser. And I need Browserify or Webpack for this? sigh
Trying to do a little tweaking with the lightweight scripts I use on this site. Trying to automate things with Babel, browser imports, etc.
This is still far, far worse than it should be in 2016. Here’s hoping it’s (substantially!) better a year from now."
Every time I do Node development, I conclude again—loudly—that purely callback-driven APIs are incredibly annoying.
If you’re contributing regularly to open source on GitHub, and you use the git command line at all, do yourself a favor and go install Hub right. now. Makes life so much easier.
I have an ongoing internal debate whether to hard-wrap lines in the source Markdown documents for my website (and everything else). Upside: it can be helpful when viewed in a terminal. Downside: it’s not very responsive in other editors or small phone views.
I posted these as a series of tweets.
Fired up and played the demo for Elite Dangerous on my Parallels VM. Made me want to buy it. But of course, I’d prefer to play it natively.
Of course, it’s available for Mac. But my (more than a decade old) joystick doesn’t have any support on OS X. No drivers, full stop.
You can find software out there which recognizes it, of course—but it’s quirky and doesn’t behave well.
Looks like opportunity calling.
I might—might, I say, not will—end up seeing if I can write the requisite pieces in Rust. Because that seems like a good plan.
Reading Learn You a Haskell for Great Good.
Hang on—all name bindings are just functions? So many things just clicked. Mind. blown.
The upside to stepping away for a bit: I just found a bug in this code… which I introduced in December 2014. :sigh:
It’s inevitably a bit challenging when you step away from a project for three months because of life and then come back to it and try to pick up where you previously left off.
I’m seriously thinking about trying Otto to make distinct environments for personal development projects.
Just noted a way my programming languages snobbery has increased: if you have
null/etc. instead of
Option/etc., I say NOPE NOPE NOPE.
Just bumped into ES6
static for the first time and was all what the heck?
So you like GitHub pull requests but not so much the resulting merge commits? Have your 🍰 and eat it too.
Somehow I’ve never made much (or really any) use of JetBrains IDEs’ “scopes” concept before. Quite handy.
Got the JetBrains Toolbox license for everything. And then realized I now have access to the ReSharper Visual Studio C++ tools. Yes!
Bizarre though it would have seemed to me just a year ago, Vim has now displaced Emacs for quick command line editing for me. Weird.
I really wish someone had explained “separation of concerns” to the person who wrote this UI/controller/blob.
The only thing keeping me sane as I work through the atrocious Win32 Shell APIs today is listening to Pärt’s Lamentate.
I really hate that a constant expression and
const-qualified aren’t the same thing in C and C++.
Today I did a code review on my iPad while walking from school to a coffee shop, using my iPhone’s data connection as a hotspot.
What a world we live in.
Related to my previous post—I really, really wish more of the fundamental papers on CS topics were freely available.
I’m suddenly finding myself with an interest in parsers and compilers. What is happening to me???
Inversion of control is a beautiful thing. Not least because it makes it so much easier to manage control over necessarily global state.
I find that I solve many software problems faster by writing them out with pen on paper. I wonder how common that is?
Needed to set up a simple test bed for a Python distribution with
setuptools, which depends on external DLLs. So I used Rust and linked it up with Python’s FFI, because it was a perfect chance to see them interact.
What are you using to track software development issues these days? JIRA, YouTrack, FogBugz, RedMine, or something else?
Flame war time: I’ve basically concluded that for the tasks I use them for, I prefer Vim’s modal editing style to Emacs’ not-modal editing style.
I’d still rather use Atom/Sublime or IntelliJ IDEA for almost everything, though.
Sometimes it is tempting as a designer to think that users are stupid. Don’t. If the software is not working for users, that implies stupidity in another party entirely: the one that designed the software. 😉
Ugh. I just discovered that a support email address has been sitting unattended for eight months. (Totally my fault.) Not a lot of problems… but any unanswered emails for that long are the worst user experience. So frustrated with myself right now.
It turns out browsers render CSS transitions for positioning much more nicely than they do those for the box model (perhaps unsurprisingly, on reflection). Use
top instead of
margin to smoothly animate an item moving within its container.
It’s nice when you evaluate a potential product’s market more closely and find your idea might actually be viable.
Where do you like to set your
--prefix when configuring personal development tooling setups? Somewhere under ~? Or somewhere else?
If you’re delivering images over the web, you need to be using something like ImageOptim. No excuses.
Tradeoffs time: whether ’tis better to drop in an off-the-shelf open source solution for this particular problem, and bring in all the extra weight it includes, or do it myself and pay in the time spent.
I found a
CEditDlg instance and went looking for it in the MSDN docs, and was a bit nonplussed not to find it. Oh. It’s a
CFileDialog subclass, and never mind the semantic ambiguity arising from the existence of a native
CEdit class. 😐
Thinking about setting Input as my typeface for doing my development for a week or two, see how it goes.
Anybody tried it? Bugs or problems to report?
Quote of the week (3-year-old Ellie talking to her mom, who has been learning Python): “Mommy! I have a function for you!”
Hooked up my digital piano to Logic Pro X tonight and wrote the theme for a podcast we’re doing together on learning to program. It’s so good!
Whoa! After years of demand, Confluence finally added support for importing Markdown-formatted content in its “Markup” box. It’s not native support for editing in Markdown… but it is a step forward. Good work, Atlassian.
Just recorded the first episode of a new, short, weekly podcast I’m working on. Audio should be live in about a week!
People often point to this (hilariously accurate) flowchart to explain how to solve tech problems… but it leaves something really important out: we “techies” know the right questions to ask. That makes a big difference.
Another little feature of Rust I quite like: the use of
traits instead of inheritance to share behavior. All the benefits of inheritance, and a few more besides, but none of the drawbacks.
Courtesy of something in my stack not playing right, I’ve now been reduced to pushing and pulling changes between OS X and my Windows VM through Bitbucket, rather than just having a mapped drive locally. This feels silly.
Hmm, this may be telling of the future… SourceTree now introduces itself as a Git tool. No mention of Hg at all. 😟
My dear wife has started teaching herself Python as a hobby. She has the essential skill required to succeed as a programmer: the willingness to persevere even when it isn’t making sense to her. I’m extremely impressed.
Playing with CSS transforms and transitions while I listen to a lecture on Romans for my New Testament class. Keep myself awake…
I cannot wait till I can switch to ES2015. Got bit by the stupid var scoping issue again. You’d think I’d be past that by now…
One of the things that annoys me most when writing C is how difficult (really, almost impossible) it is to do anything generically. The same operation for different items in a struct? Good luck. It’s possible, but rarely worth the work.
Tip: if you’re using Mercurial’s bookmarks to track lightweight branches, somewhat analogous to Git’s branches, use Mercurial’s special
@ tag to track whatever you want to treat as the tip of a
master branch. That way, any clone will check that out by default.
I just taught Jaimie how to use GitHub for Mac (as she is helping a friend with his Jekyll-powered website), and explained the basics of distributed version control. She is totally a boss. And GitHub for Mac is a pretty good app.
One of (many) irritations with using Angular: every search turns up Bootstrap solutions.
I’m not using Bootstrap.
Currently on my mind: how to chunk up the Bible text with semantic blobs and chapter/verse trees in corresponding data structures, in order to present meaningful sections of content (paragraphs, etc.) without resorting to delivering a whole book.
This post brought to you by a brand new script, which automatically generates the file needed—YAML header and all!—to create a new microblog post on chriskrycho.com. Python for the win.
I confess: my first response to seeing this page was a flash of anger: Hey, he didn’t just learn from my site configuration, he actually stole my site design! And then I remembered: I open-sourced the design precisely so people could do that. This was just the first time I’ve ever actually had someone reuse something I did and shared like this. It was a strange (but ultimately wonderful) feeling. I hope to have it again many more times.
In any case, I rather like the tweaks Andrew Comenga made to my design to make it his own; go take a look!
Microsoft Visual Studio: bringing you links in error messages… that aren’t clickable!
I’m doing Project Euler with Elixir as a way of keeping myself sane while I try to get a project that worked fine in Visual Studio 2015 Technical Preview to build in Visual Studio 2015 Release Candidate. sigh