What a year: 2017
This year has been a long year. Much of it centered on the national news. The anger and threats. The crumbling of icons to harassment. The feeling of powerlessness as the majority is ignored in the country. The non-stop desire to see what other embarrassment or trauma was in the news. None of that was good, but good did come out of it.
It was a year of endings for me and, in that ending, hope of new beginnings.
Apple
The only apple device I currently use that I used at the start of 2017 is my iPad Pro. In the spring of 2017, my 2009 iMac died (hard drive failure). It was a slow death which held the promise of maybe keeping it as a display monitor. I tried to use just my Macbook air and either use a dedicated external monitor or the 2009 iMac screen. Both ultimately ended in failure (the dedicated ones never looked good with the MBA while the iMac had catastrophic heat failure).
- I ordered a new iMac in May, but they released a brand new version at WWDC. It was just within my return window so I returned the old new one and got a new new one. Been happy with it ever since.
- My MBA died in November. It was working fine one moment and then it was dead the next. The repair would have cost more than a new refurbished one at MicroCenter (Apple no longer makes my beloved 11" MBA) and so I got that. Looked briefly at the Macbook but the keyboard felt like pounding on concrete.
iPhoneX came out and I just had to get it despite getting a lot of flack for paying so much for a new phone. I love it. I love the FaceID login flow, the smoothness of it all, the screen, and the camera is just fantastic. Low light, no problem. Crystal clear video. Cool zooming. I am not that much into taking pictures anymore, but this makes me wish I were. I might explore Halide a bit with it to learn more about digital photography. My daughter inherited my iPhone6; she was another motivation as her iPhone4S (my old one) died suddenly.
I bought the iPhoneX and the iPhoneSE for my wife using a tradeoff of a new carrier: Xfinity Mobile. We were paying $90 a month for AT&T. After our first month, we paid $25 for Xfinity Mobile, $12 for 1GB usage level (we used 200Mb) and $13 in taxes. The taxes are non-negotiable, but the $12 could disappear if we used less than 100Mb – seems unlikely).
So in one year, I got a new iMac, MBA, and iPhone. If FaceID comes to the iPad and they redesign the Apple Pencil to have an eraser part, then I would consider replacing the iPad Pro too.
I also bought AirPods and absolutely love them. They can be a little slow to switch between devices, but otherwise, I am very pleased with them. Being wireless is incredible, and pausing when I take them out is a fantastic feature. I don’t use the taps very much. The quality is fine for me and the range is great. Also, when they run low on power, I can charge one at a time. I don’t often run out of power, but in the times I do, it comes in handy. I also enjoy sharing them with my wife when we are watching something together that is not intended for our daughter.
Apps
While speaking of Apple, there are a few apps that I find amazing to use:
Mac
- Yoink. Drag and drop files onto the side, then find where to put them, drag them out. I find this works very well for me as I like to segment out my process in exactly this way: First find it, then figure out where to put it.
- Grand Perspective. This is blowing my mind away. It can scan any folder (or the whole drive) and show in nested blocks the storage area. As one mouses over the blocks, it shows how much space and what file it is. This is a great way to get an understanding for where the space goes. Pretty too.
- Magnet. Still early days for me, but this is a windows manager for snapping to a few specified areas using the keyboard. It seems to do exactly what I want though having a few more options would be very useful for me.
The indispensable apps I use all the time are, of course, MacVim, SourceTree (git), Terminal (ssh, literate-programming), 1Password, and the browsers (Chrome, Firefox, Safari). Some storage programs and some math apps are listed below.
I also acquired AffinityDesigner. It looks awesome and I hope to use it, but I have not yet had an opportunity to really delve into it.
iOS
To be honest, I have tried a number of apps, but there are not that many that really captures my attention. I continue to use SafariBooksOnline, Reeder, Firefox Focus, all for consuming.
- Love you to bits. This is a graphical game that reminds me strongly of text-based games. My daughter and I both enjoyed playing through it. It is the spiritual successor to the much beloved (and gone) Tiny Thief.
- GrafnCalc83. A wonderful touch implementation of the TI-83. I have the actual calculator, but the iOS version is a joy to work with while being very faithful to what the TI-83 would produce.
Many of the apps I come across seem to demo nicely (IKEA furniture placement app, for example), but I simply do not use that many despite having a lot of them.
I do use Notability for writing out notes on my iPad. It was particularly useful in conjunction with Screenflow in doing videos of working out mathematics problems.
I have also used AstroPad for converting my iPad into a graphics tablet for my desktop.
Storage
With all the failures of my devices this year, backup has certainly been on my mind. I had pretty good luck with them all except for my daughter’s iPhone4S though I am not sure that there was anything much lost on it. Right now, I am using iMazing to do backups to an external drive connected to my iMac. They do it wirelessly to all the devices and this seems to be working fine.
For the desktop and laptops, I use Carbon Copy Cloner 5 and back the laptops up once a month. I also have Arq which backs up the high use folders (desktop, downloads, documents, my repositories) to OneDrive. Additionally, I have a main external storage folder that keeps a bunch of stuff, such as the photo library and I back that up to another external drive.
I just finished sorting all the many “messy desktop” folders all around and consolidating all the materials. Saw some interesting memories along the way, including my Tiddlywiki experiments. I have my OneDrive sync folder with a variety of documents that I find useful. I hope to keep it in sync with the folders on the main Storage device, probably using rsync.
Storage is still a bit of a pain, but I am hoping to work at it.
Currently, I have Amazon Cloud Storage and OneDrive. They are both very nice. I opted to not go with iCloud because I could not understand how to control what was syncing where. It sounded like they try to stuff my hard drives full and manage it. I am a big fan of having control even if it does cause me headaches of organization.
Jobs
My jobs have certainly changed a bit this year. I quit one part-time online teaching gig because I did not like the direction it was heading. I also wanted to have more time for other efforts. But another of my part-time online teaching gigs has been going crazy with enrollment so instead of 2 semesters, it looks like I will be teaching 3 semesters in the year.
I also left the neighborhood association. I am quite pleased to no longer be going to meetings.
My Arts&Ideas job also expanded to include a summer camp for our students. It went well and we expect to continue it. It is a very different feel, much more relaxed, but it also takes up a lot of time. I did feel that having limited free time helped keep me focused on working on what I was concerned with.
Healthcare
We have used CareFirst since going on our own about five years ago. We initially had $300-500 in premiums per month, but last year it spiked to $900 and now this year it would be $1500. This is insane given our income levels. So we switched to KaiserPermanente for about $500 a month after subsidies. I worry about the stability of the health system, but I guess we’ll take it one year at a time.
This year, none of us needed medical help, that I can recall. In previous years, I had sicknesses and a surgery, but this year was a healthy year.
I did get a FitBit which has helped me stay motivated to move around. My weight is not moving in the direction I want it to, but it does seem at least stable. My goal is to lose about 30 pounds from where I am now.
Shoes and Sandals
This is the year when my feet stopped wanting to wear shoes. Shoes I have worn for a long time became uncomfortable. Perhaps my feet have gotten wider, perhaps I just have transferred my claustorphobia to my feet.
In any event, I started wearing sandals. All the time. Even with socks. To deal with weather, I have overshoes. One pair ($10) is for rain and light cold or snow. Another pair is expensive ($100) but are built for heavy winter use.
I have used both of them, I find them amazing. They look a little dodgy, but I love to wear my sandals and this is a neat separation of the external needs. The foot size of these overshoes are very large, but my feet are securely placed inside thanks to the sandals.
Inside, I have the comfort of open-toed sandaling.
RPG
Pushed by the students at Arts&Idea, I have been working on a new role-playing system based off of D&D. I call it self-directed role-playing. It takes the classes and breaks them up into individual skills. The system is complicated for the assignment of experience points and requires a computer. I also revamped the magic system to open it up to characters in a more general way. The combat is largely opposed rolls of attack versus defense. The initiative system is also computerized to allow for a dynamic ordering based on trying to make everyone feel like they are participating more (the less well one does or the more minor the action, the sooner one gets to play again; also defending slows one down a little as defending is rolling dice).
One neat feature (I hope) is that instead of a d20 for everything, the skills start at d4 and work up to d20, gaining modifiers at each level. Since attack and defense are opposed, this should balance out, regardless of how it goes, but I am hoping to reduce some of the random swings of fortune while still giving the thrill of rolling. The damage is a multiplier based on weapon and other factors, multiplied by how well one does in succeeding in the attack.
The biggest question is whether we can run this at a fast speed.
I hope this deals with the problems I have with D&D. The material is very nice and thorough, but the system has always felt not quite right. I have done some playtesting with a brave group of guinea pigs. In a week, I hope to begin two groups working through the prepared D&D adventures of Out of the Abyss and Curse of Strahd.
Fifth Staff
We spent the year at school looking to hire a fifth staff. It was quite a journey. We learned a lot, had a lot of fun with the Hiring Committee, and we finally did find someone that we are all very excited to join us.
But it is tough to envision a fifth person. We have been a tight group of four, knowing each other quite well. We can anticipate how each reacts and we have the bonds to both care about the others while also being free to oppose one another.
I have confidence in the person we hired, but it will take time to adjust.
We also hired a professional cleaner for bi-weekly cleanings. This has also been an adjustment.
Development
I have found this year to be difficult to work on my projects. I have added some to literate programming. I entered this winter break with the intention of redoing it, using Promises or perhaps Observables. But on looking at the options, I realized I love my Event-When paradigm. So I have spent the vacation trying to improve that, which is still a work in progress, but I am pretty happy with some of the innovations. It strikes me as the mental model that works well for me: events happen, stuff reacts to it. This is a bit silly in terms of scientific or mathematical computations (maybe), but for user interaction stuff, it is perfect. Even in the realm of math and science, events can be a way to break problems into separate computations.
My goals are to finish the Event-When rewrite, incorporate that into Literate-Programming and update all of that. With luck, I could get that done by May.
Once that is done, or perhaps concurrently, I intend to finally get my own blog system going and MathPebbles. So much to do and I still need to do A&I internal web stuff.
I am captivated by the ideas of mathematics and physics. I have been taking breaks from programming this vacation and retreating to reading mathematics. There is so much to explore and understand. This is what I hope to bring to MathPebbles. I think one idea for the site is to thread some pebbles together as a kind of companion to some good math books. I used to think of writing a math book, but there are plenty of those in existence. What is needed is a platform for exploring mathematics in a way that is most helpful to those learning. I absolutely love GeoGebra, WolframAlpha, Desmos, but they all strike me as giving answers while skipping much of the journey. I want to remove the burden of the manual computations, but facilitate stepping through the process rather than shortcutting it.
Family
Family has been good. My daughter is growing up fast. While only six, she seems much older. She has just lost her two front teeth. She is into Legos this year, working diligently in following the instructions of the sets. While I always enjoyed the free form method, I have to admit it is pretty cool to see the constructions she makes.
My parents are definitely getting older. We have had some conversations in trying to prepare for the inevitable, but I get the sense that when disaster finally strikes, I will be completely unprepared. I can’t help but continue to think that our society is most failing the young and the old. Our lack of neighborly community, shall we say, hurts them the most.
I do worry that I spend too much time working on my projects when I should spend more time with my daughter and my parents.
My wife is going through her own journey. The new year may see some significant changes to our lives as she takes on a new direction.
Future
I am hoping this year will be pretty stable in terms of my jobs, devices, and time usage. My hope is to get MathPebbles going full blast along with finishing up Literate Programming and Event When. There are some internal projects at A&I to do as well as the RPG to run.
Each year, I hope to get further into my many projects. There are books and other projects I want to do, but I think the biggest desire is MathPebbles. So let’s hope this is the year for that!
Sunday will be a day to declutter, clean, and refocus each week on the upcoming week. Discipline is the call to action.
Bugbear Files: Apple Music
Whenever I use Apple Music, I think “Wow, this is a great Bugbear Gift from Apple.” And by this I mean, I want that thing out of my life.
I find the interface clunky and confusing. But its built in behavior is just downright antagonistic.
For example, I like to listen to albums. Well, I can’t always get through an album in one sitting. I go off, do something, and come back ready to hit play and finish that Essential Jethro Tull 60-song awesome collection. I made it through maybe 10 songs the last time. The image comes up. Great! Just got to hit play — NO! Apple Music has gone back to the home screen wiping out all traces of what I was listening to.
I have also heard tales of people losing their own music. In terms of my library, that might just be a blessing. Still, no luck with that.
Then there is the bunch of junk that I am not interested in that is thrust into my face every time I start the app.
I have also found that while it has something of most of what I search for, the ones I most long to hear are not present.
Finally, my experience is that my battery is draining quickly with Apple Music. That is an unscientific claim, but an annoying perception nonetheless.
It did teach me though that I do want to just listen to albums. Maybe I’ll try a paid Spotify trial next.
I guess Apple software is good at opening up possibilities that motivate me to try better solutions elsewhere.
Apple Music
It is the eve of Apple Music and it has brought to my mind streaming music again. I have tried half-heartedly in the past.
I have Amazon Prime for the shipping and tried their streaming. It seemed limited for my tastes and limited investigations.
I also tried Spotify for awhile; just the free tier. I think it was when they first started and perhaps their selection is better now than it was or perhaps it had to do with the free tier.
So the other services I don’t want to poo-poo. For whatever reason, I never pursued them. But with the allure of Apple, if their streaming meets my investigations, then I am excited for one thing: albums.
It is very easy to listen to any particular song and even artist. YouTube, for one. The radio does a good job too; I love 100.7 the Bay!
But what I lack is the ability to listen to albums. I enjoy Bob Seger, but I only have a couple of albums. Being able to listen to all of them would be awesome. I would enjoy exploring the artists’ vision for their music. It sound exciting to me right now.
But album consumption is like a movie; I doubt I would listen to most albums very often, if at all again and they can get expensive to buy many of them. So using a streaming service to play albums seems perfect.
That’s what I am looking forward to trying tomorrow.
When a PhD Gets His Degree…
A friend of mine just recently defended his thesis. In honor of that moment, I wanted to point out a couple of clips to munch on:
Welcome to the big leagues, kid.
Architectural Fog
I have been reading the Mythical Man-Month. One thing that struck me is his insistence on how hard the architecture part of the programming task is. I feel this architectural fog every time I start a new project. That blank screen taunts the vision in my mind.
This echoes what I have read elsewhere. If someone were to ask for a fine-grained programming task, it is usually pretty easy to create. Of course, what fine-grained means depends on experience. Still, the idea is that the small unit of programming is easily handled.
What is hard is assembling all those units together into a cohesive structure. From skyscrapers to programs to documents to websites, this is the hardest part. There is the big vision which is not often hard to have. And there are the very small details which are generally straightforward once their specification is made. The middle part which is translating the big vision into small pieces is what is very hard.
Literate-Programming
Of course, to me, the task is well-met by literate programming. The literate programming paradigm is that of essentially writing down the architectural blueprints and then letting the computer create the actual code. It doesn’t make the architectural phase easier, but it does make it very easy to translate the decisions into the small units and let the well-specified, but messy, sewing phase be done by a computer.
Literate programming also allows for easy moderate re-architecting. As analogy, imagine a multi-floor building. It is hard to simply alter the overall dimensions of a whole floor, but deciding to change some of the room dimensions on a floor can be easy (depends of course on what structural elements can’t be altered). In the same way, moderate changes in a literate programming are generally fairly easy to make. Making large structural changes can still be very hard, but at least the existing plans are clear.
I tried creating a basic webpage the other day without literate programming and I was amazed at how confused it got as it expanded to cover all the different parts of the page. I am now architecting that page with a literate program and it is going much better. Every piece can be examined in isolation when doing the details while the overall architecture can be safely reorchestrated.
I can also feel the difference in development pains, in some ways. When I used to code long form, I would start with a good gallop and then get bogged down in the weight of the code as I approached the finish line. With literate program, the architecture is much more in the forefront (it doesn’t have to be, of course, but it suggests doing that). And that makes the initial stage much slower. This is probably a good thing. Then as the architecture takes shape, the speed and ease of the project gets better. As it becomes just the small details left, and they have been well-specified during the architecting phase, this is relatively easy.
I don’t work in team programming, but I think one way to use literate programs for teams is to implement the division of labor in a literate program. So let’s say we have architect A and programmers B and C. Then A writes a literate program that specifies what it will pull in from the literate programs of B and C. It specifies exactly what is needed. Then B and C write their literate programs to those specifications. The compile phase goes over all of them and incorporates the different codes into a single programming project.
This would allow B and C to also specify various test code and documentation for each piece of their code in their literate program. It also allows for the assignment of tasks to not correspond to modules, etc. If B was the file system guy and C was the database guy, then B could write the file system access parts while C did the database. They could be intertwined into the same function, but each working on separate bits. In other words, the structure which the computer needs (modules) does not need to map to the separation of concerns of the programmers.
Event-when
I also have another library I created, event-when. This deals with a lot of pain points I have had in programming. But it is still hard to get it going.
After reading the Man-Month, I think I know why. My use of event-when is as the backbone of the program. That is, it encapsulates the overall architecture of the program. This means that the hard work of program construction is being implemented with the event-when library.
So both of the major coding tools I created have been to deal with this architectural issue. I find the rest of the programming to be rather easy to deal with, but sewing it all together is very hard.
At first, I felt that event-when and literate programming were not helping each other. But I eventually found a way to use the compile phase of literate programming to cut down on the boilerplate of event-when and even change its input syntax to something that would not work in the language without a compilation stage. They now support each other much better.
Tracer Bullets
I have also been reading the Pragmatic Programmer. In it, it describes the notion of a tracer bullet. That is, you fire a bullet that you can trace and so you can see how close to the target it gets. In programming, this means creating a “working” skeleton of a program and iterating on it.
The Man-Month talks about this too. It is an essential technique for having a product that takes shape as one codes. This allows one to get more useful feedback during the construction of the program.
Both event-when and literate program facilitate this quite nicely. The event model allows one to have the whole chain of events emitting with fake data. And so one can very quickly get a “working” program. Then one can go and put in the actual details that occur with each event/action.
Literate programming allows one similarly to code up the overall structure using stub sections. One can then write the true details for each stub and activate those sections as they are finished. It would also be easy to toggle between the stub and the actual code during debugging.
All in all, I have great confirmation bias for my projects. I think they handle the pain points that I self-identified and have now confirmed are the pain points that other people point out as well.
Minimal Participation in Democracy
A thought occurred to me the other day. Democracy in this country is often cited as broken. Indeed, the fact that one of the two major political parties in the country is doing its best to disenfranchise voters suggests that the spirit of democracy has left.
Even the other party seems to worry more about winning than promoting democracy.
But what is to be done about it? Well, the only true (legitimate) power anyone has over another is the right to say no. If you do not like what a company does, you can refuse to buy from it or work for it. This gives a measure of power to someone proportional to their relevance. A small group of people boycotting a company would have no impact, but a large group of people can have quite the impact. This is why organized labor is fought against by companies since such organization shifts the power to the people.
And what is that power? It is, ultimately, the power to walk away. Companies need employees (currently). And so employees wield power over the companies in that fashion. This is a good thing. But no single employee has too much power; this is also a good thing since some people are just crazy.
Anyway, in democracy, lack of participation leads to bad outcomes. I know people who seem to seriously suggest that not voting is a form of protest. But it is not. If one person votes, then that person controls the election. The people who vote benefit from others walking away. Politicians benefit from people not voting, particularly if the non-voters would have supported the opposition. This is why targeted disenfranchisement is so tempting.
So my proposal would be to have a minimum level of participation for an election to count. Say 80% of voters have to come out and vote. For those elections currently under that (probably all of them), they could have a staggered increase per election to reach that level.
Isn’t 80% really high? Yes, but think about what that would mean. To get elected not only would your voters have to turn out, but so would the other side’s voters have to turn out. By not voting, they would be rejecting all the candidates at once.
And so the discussion and tactics would shift to promote a love of democracy. Perhaps elections would be moved to the weekends or remote voting would be enacted. All sorts of interesting solutions would come about because the incentives would be there to get people to vote.
And what if the threshold is not met? Redoing the election is one option. Another option is that seats remain vacant. This is particularly effective for legislative seats as opposed to president/governor/mayor type positions. For example, if a state did not have enough voters turn out for an election for a senator, then that state could simply not have a senator. It would lose its voice and power.
Choosing not to participate should be everyone’s right. But if it has no impact, then that right is essentially neutered. It creates perverse incentives.
Tolerating Intolerance
Is it okay to be intolerant?
This is not an easy question to answer. Some might say “no” automatically. Others might say “yes” enthusiastically. But most who think about it, I would guess, would kind of harumph and know exactly where the difficulty lies.
If it is not okay to be intolerant, then how can one be intolerant of intolerance? It is a similar dilemma to capital punishment. If it is not okay to kill people, then how can we coldly, methodically kill people?
I think both drive to the heart of the same problem, the one cast in stone by an “eye for an eye” leading to generational hatred and warfare. How does one stop it?
The answer is easy to say, practically impossible to do: stop retaliating. When someone does a wrong to you, turn the other cheek. That is how you stop them. And by them, I don’t mean the people doing the actions. I mean the demons controlling them.
For you see, humans are, by basic nature, generally friendly and social. However, we are very susceptible to being brutish. And that brutality can take hold for longer than any reasonable need. It propagates itself. It is a negative meme. When person A inflicts harm to person B, the mission is not done. When person B retaliates with anger, hatred, intolerance, then the mission is accomplished. The meme does not have an end goal of destroying, but rather of propagating. Its method of propagation just happens to leave a trail of destruction.
Why am I writing this? Well, recently Brendan Eich, the creator of JavaScript became the CEO of Mozilla. The techies erupted in fury and Eich resigned. His crime was homophobia in the form of supporting an anti-gay marriage proposition in California, six years ago. As far as I know, there were no other reasons, including no personally discriminatory acts by him against anyone. What he did was fund a campaign to enshrine a discrimination into law.
I would say that was wrong of him. The overall issue is not settled, but the rights are being won and probably soon, all of this will be a distant memory. Part of my problem with what happened is that the ousting of Eich does not in anyway help the legalization of marriage between same gender people. That is, this is not an action to help the cause, but rather retaliation for him taking the wrong position.
Well, isn’t that fair? Tit for tat, and all that? I am not sure how to judge fairness, quite frankly. His life led him to that decision. It surely seemed reasonable to him given his experiences and beliefs. Retaliating against him is punishing him for the environment he found himself in.
Indeed, just think of someone like Thomas Jefferson. He owned slaves and thought it was good for them. If he lived today, he would not think that way. Should we revile him because of his stance on that? Alternatively, we can celebrate what was truly good about him and remark with sadness his misguided views – never approval, but neither hate.
Isn’t all this letting Eich off the hook a bit too easily? And can’t we make this case for all the bad people of the world? Yes, we probably can. The issue is whether punishing people is useful.
What is useful is stopping bad people from doing harm. Often, this can be done with the strong arm of law and military to some extent. But they are rarely ever fully successful. They are fighting a hydra with a sword.
What one really needs is to remove the hatred, intolerance, and/or economic incentives. And being hateful/intolerant as a strategy is not particularly effective in convincing people to stop being hateful/intolerant.
Responding to intolerance with intolerance is bad for a few reasons:
- It propagates intolerance.
- It says, in some ways, that intolerance is okay to do it.
- It undermines the common ground the could bind disparate people together.
- It motivates secret activities that are harder to discuss.
- It undermines the principles of an open democracy.
Instead of allowing discussion with understanding and respect, intolerance of intolerance creates divisive camps. Friends try to agree, enemies try to disagree. That’s why we should all try to be friends instead of enemies.
Fostering respect and tolerance should be the goals of every person in this society.
So am I intolerant of those who were intolerant of Eich’s intolerance? No. I am sad. I wish they could see that the disease of intolerance that was in Eich is now in them, that the monster they were fighting has already won. The monster does not care if people are discriminated against based on their sexual orientation.
It cares about propagating intolerance, whether seemingly well-founded or not. Intolerance and anger is its wages.
We can fight this monster with respect, kindness, tolerance, and forgiveness.
Event-When
For the past two months, I have been working diligently on updating my event-when library. I really like it now.
I have over 80 tests, covering as much as I could think of, including an integration test.
I have a comprehensive README that documents all the methods with links and examples.
The feature set is basically what I want: tracking of multiple events, action naming, great logging. The logging may still get tweaked. It is hard to figure out exactly how to get all of that sufficient, but still readable.
In my journey, I switched to Vim (loving it) and wrote a script that automatically compiles and tests upon every save with it telling me (with verbal speech) if it failed (and then when it passes again) [no need to switch to know about failure!] – loving that too.
I feel like I am becoming more and more of a project-oriented coder. I went deep not to just get this right, but to get something really right. It is an important thing to do every now and then.
All of this was prelude to redoing literate programming. I have big plans and visions, but I hope that with my event-when library powering it, it will be quick to code. Then with my toolset in place, I can finally tackle so many projects.
If you want a flow-control library, checkout event-when. I hope to write more in the future, but I want to celebrate pushing out v0.6.0 of event-when.
Yippee ki yay!
I switched to Vim! I saw talk about atom from GH on HN and it made me realize that I didn’t actually like Sublime all that much. The DailyJS author likes Vim and I respect a lot of what he has written, so I tried Vim.
I am liking it a lot. It takes some getting used to, but it seems very easy to do things that I want to do. It just takes time to (un)learn the finger muscles.
Git and JSHint I can easily run in Vim; the same was true in Sublime, but it was not as convenient. Indeed, I can easily see git diff in Vim, do the commit with a nice message, etc., all with split windows instead of a complete context change.
As for JSHint, the picture above shows a great use of it in literate programming. I compile my JS programs from lit pro. I edit the markdown, save, and then the compiled js program reloads (manually, perhaps), and then JSHint runs automatically. It can take me to the error automatically (hopefully) and then I select a relevant part of the code using the visual select mode, maybe pressing V, and then type * which will search for it. I go to the other window Ctl-w w (might remap that) and then hit n to find the match on that side. Correct the code, seeing the compiled context, error, and litpro part all on the same window. Rinse, repeat.
But the first screen shot is incredible. The Voom plugin allows me to have an outline mode where I can navigate around the file and restructure it easily with just a few key presses. This makes literate programming shine. It also has already motivated me to organize my sections more logically. The TOC tells a story too and now I can see it implemented.
For literate programming, Vim seems to rock in addition to it having a very convenient set of motion commands.
I also like how I can use each tab as a per-repo tab. Since I can quickly open files, call them back, etc., when working in one repo with the same directory (or just a level down, etc), it seems convenient to switch or split. But when I have multiple repos in mind to work on, then tabs are useful. In Sublime, each file got its own tab and I would end up with quite the sprawl of mixed files from different repos. It was annoying. This is tidy and nice.
I have been recording my thoughts/experiences/tips in repo
The only downside is that I actually had to work through the provided tutorial, read the user manual, and am tweaking a lot to get it to really work for me. It has taken me a week to get it to a state where I think I can get some work done. But I am hopeful that it was a week well-spent.
Radio Silence
That was a bit of time off from the blog. I kind of missed it. When I left, I decided to try and roll my own blog system. I kind of did, it’s kind of done, but it needs some more work.
I targeted Mord’s Blog of which the old version is at previous Mord for now. The old Mord is being self-hosted using WordPress. I didn’t like that system which is why I currently use tumblr. But I have always wanted to do it myself.
So to that end, I web-crawled my own Mord blog and converted the HTML to markdown. Then I wrote some scripts that convert that (and drafts) into blog form. You can see the repository at git mord.
I wrote both the scraper and the blog maker in literate program fashion. While my literate program program is fine for compiling scripts, it had some spots that are a bit awkward for entire site writing.
So before pressing on to the more complicated tasks of porting my sites (and creating new ones), I want to rework my literate programming program. Specifically, I want to:
- Use marked to parse the program, using the ability to access the parser directly. This should handle most of my parsing needs. I will still need to parse the block substitutions, but that should be a much simpler task than trying to deal with the complexity of markdown parsing. In particular, I can use all the ways that code blocks can be created. Experimentation will be called for, but I am optimistic that this will greatly expand the potential.
- A specific example of the improved parsing will be to have substitute blocks in commands of substitute blocks.
- Event-based compiling. This should allow for doing all sorts of whacky code path computations, including fetching external resources.
- The main body of compiling should return an object with all sorts of inspectable properties. It should also accept a callback function when being called; that callback function would then do any file saving, etc. This should make it much more pluggable.
- Revamping the plugin system. I want to make it very easy to plugin functionality and to use it. I figure mimicking grunt with its grunt-jslint kind of usage would be reasonable.
So I am putting everything else largely on hold while I retackle the literate programming program. I have really enjoyed using it, but it needs some improving. As it stands, I would not be comfortable promoting its use. I want to change that. And soon.