Human brains are really bad at reasoning about the correctness of concurrent systems. Even when we use files in simple ways we are usually skirting several race conditions that just happen not to pop up while running the code on a single laptop for a few days. After starting to write my networked code in ways that let me do randomized partition testing in-process, I’ve been so humbled by the dramatic number of bugs that pop out when you just start to impose possible-yet-unanticipated orders of execution on concurrent systems.
I’ve started to expand the approach to file interfaces that record writes since the last fsync, and can be “crashed” during tests at different points. Concurrent algorithms that can be deterministically replayed in any interleaving of cross-thread communication points. This has been fairly straightforward on systems that run on top of libpthread, but I’ve been struggling to apply these techniques to existing go codebases, where concurrency is not interactive from go programs themselves. External instrumentation of the process at runtime from ptrace gets gnarly really quickly.
I wish that as a language that encourages the usage of concurrency more than most others, go also embraced understanding its concurrent behavior more. Does anyone know of better options than using rr’s chaos mode on a go system after forcing all goroutines to LockOSThread?
Do you already know about TSAN? https://golang.org/doc/articles/race_detector.html
TSAN and the go race detector are similar (I think Dmitry Vyukov might have been involved in creating tsan, in addition to the go race detector) and they work by instrumenting points in the code in similar ways as what I mentioned, but I’m interested in further applying these techniques to actually cause different scheduled interleavings (and ideally having deterministic replay) to gain more confidence in the implementation. Just running TSAN or go -race will only catch synchronization issues (tsan has false positives because it can’t reason about bare or implicit memory fences, but go -race doesn’t have this issue because you can’t express these memory semantics in native go) that your execution happens to stumble on while running an instrumented binary. Sometimes the mere instrumentation of the binary causes timing changes that prevent race conditions from popping out as often as they would in production. I want to force diverse executions (ideally fully exhaust the interleaving space for small bounded execution combinations) in addition to just detecting issues.
Jepsen is thousands to millions of times slower than in-process network partition simulation, takes a month to stand up if you already have clojure skills, and it does not result in deterministically-replayable regression tests for issues it finds. It’s fairly expensive to run on every commit, and you can’t afford to block devs on jepsen runs in most cases. Here’s an example of what I’m talking about for network testing applied to a CASPaxos implementation. In 10 seconds it will find way more bugs than jepsen usually will in 10 hours, so you can actually have devs run the test locally before opening a pull request.
What you’re describing reminds me of the FoundationDB simulation testing talk.
They instrumented their C++ codebase to remove all sources of non-determinism when running under test, so they could test their distributed database and replay failures, stressing it in exactly the way you’ve described.
Let me try to find a link.
Edit: I believe this is it: video
Yeah! This talk was really inspiring to me, and I’ve been pushing to test more things in this way. There have been some advances since that talk that address some of the complexity downsides he mentions, particularly lineage-driven fault injection. LDFI is the perfect way to make a vast fault-space tractably testable, by looking at what goes right and then introduces failures from there.
That’s fine, I guess. I’m not really sure why you’d want to use this when better tools have existed for years; even if you don’t subscribe to “WYSIWYG” graphical word processing, there’s still tools that are more usable and useful that subscribe to the Unix tautology.
While I could be sarcastic and say I tried ed because I like pain, Dark Souls is too easy, and going to a dominatrix would upset my wife, I actually have reasons for doing this.
Hand cranked cars that also required extensive manual lubrication weren’t that horrible either, but you would want to use them today? No, thanks ;-)
I figured that if Ken Thompson could use it to write the first version of Unix on a PDP-7, it couldn’t be that horrible.
How is that possible? I though he had to write it in assembler, and only later on was it re-written in C with the help Ritchie?
But seriously, by that logic we shouldn’t have advanced beyond research unix v1, since if it could be used, why bother changing it? I understand this attitude if one looks at it like a game, but otherwise I’d rather prefer a more integrated experience, at the expense of having to focus by one’s own willpower.
It was originally written in assembly. They started turning B into C in a series of steps called “proto C’s.” They couldn’t do UNIX rewrite in them until the one with structs.
If arguing from Thompson’s actions, you’d write a modern, graphical OS in assembly (see MenuetOS). Then, you’d partner with someone who could build the best system language you could on top of the one you had available within your hardware constraints. Probably be more like Rust or Nim esp since they already exist. Could be better, like a leaner one. And then rewrite the assembly OS in that.
The result doing about the same things they did with modern tools would output something much better than UNIX and C. People trying to keep to what they did is like if they tried to keep doing what successful, number-crunching, batch-oriented computers did. Better to try to improve things.
well vi encourages editing while you write and has a lot more commands, which can be distracting for some. i’d say vi is a different tool, not necessarily better.
Have you heard of vi? It’s a “visual” mode for ed. A truly amazing innovation. It lets you see the file while entering ed commands, and changes get reflected immediately.
Isn’t that, mostly, sam?
“missing” out of the box for composition and revision are tools for version control
There’s RCS and CVS in the base system for that.
One thing that I find somewhat unfortunate is that OpenBSD has a lot of great text editing tools, yet it’s missing any kind of typesetter (troff, TeX) in the base system.
…editing because @xorhash had been kind enough to remind me of rcs(1) and cvs(1)…
OpenBSD’s base system doesn’t provide dictionary searches or spell check, either, but I’m fine with that. I’m grateful they provide X Window as part of the base system. Stuff like git, troff, aspell, diction, pandoc, and dictd I’m happy to install using the package mangler.
What I would love to know is why OpenBSD ports has the dict server but none of the dictionaries. If I want a dict daemon on my laptop so I can check definitions offline, I have to get the actual dictionary archives out of the FreeBSD port’s distfiles because ftp.dict.org is dead. While I can do that, I’d rather not have to. :)
I second xorhash’s mention of RCS. (Though, I’m no BSD user.)
I heard somewhere that RCS was designed with your sort of use case in mind! Maybe it was this post (2009)?
It’s certainly an easily understood, unixy tool. Maybe I’ll try using it one day. ;)
That’s an excellent introduction. Thanks.
However, RCS isn’t actually suited to my use case because I don’t use one file per novel. Instead, I write novels the way I code at my day job, with text distributed across various files in a directory tree. Yes, it’s probably overkill, but it beats paying a shitload of money for a Mac so I can use Scrivener or Ulysses.
My hierarchy currently looks somewhat like this:
$SERIES/
$TITLE/
title
dedication
disclaimer
acknowledgements
$SUBPLOT1/
01.scene
02.scene
01.revision01.sed
$SUBPLOT2/
01.scene
When I’m ready to read what I’ve done as a whole, I’ll assemble the whole mess using cat and fmt. Likewise when I’m done with all revisions and am ready to submit to a publisher. At that point I’ll put everything together into a file like “submission01”, mark it up with with Markdown or reStructuredText (depending on whether I was pretentious enough to include footnotes), run it through pandoc and convert it to Word format (unless the publisher is hip enough to accept an OpenDocument Text file, and then edit the output in LibreOffice to suit the publisher’s house style.
You can’t manage something like this with RCS. CVS would be more appropriate, but as I mentioned in another comment I’m already familiar with git. I use it when tinkering with static site generators, build websies, and at my day job.
Apparently there’s an AppImage of the unfinished Linux version for people who don’t want to use WINE.
Believe it or not, I’ve tried Scrivener. It’s not a bad app, but I don’t like that it stores everything in RTF files. When I’m drafting something, I’d rather work in plain text.
Also, as @qznc noted, a tool like ed(1) is great if you have a tendency to go back and edit unfinished work. I have this tendency in spades.
I don’t see why you can’t use RCS.
% ed test
a
this is a test of using
RCS for version control.
.
w
49
!ci -l %
ci -l test
test,v <-- test
enter description, terminated with single '.' or end of file:
NOTE: This is NOT the log message!
>> test check in
>> .
initial revision: 1.1
done
!
,n
1 this is a test of using
2 RCS for version control.
a
Now we add a new paragraph.
.
w
78
!ci -l %
ci -l test
test,v <-- test
new revision: 1.2; previous revision: 1.1
enter log message, terminated with single '.' or end of file:
>> new paragraph
>> .
done
!
,n
1 this is a test of using
2 RCS for version control.
3
4 Now we add a new paragraph.
q
Compared to git, the only thing that’s missing is keeping track of contents that get moved from one file to another.
RCS is one repository per file. That’s not what I want. I want one repository for the entire project. And I want the master repository to live on BitBucket (or some other provider I trust because I’m too lazy to self-host on a VPS). This lets me sync between multiple machines.
This way, when I’m dead because somebody got upset about me typing in public and decided to beat me into the ground with my laptop, it’s possible that some other nerd who overdosed on JRPGs and Blue Öyster Cult albums as a kid might find it and take over. :)
In the true spirit of unix, you use one tool for one purpose only. Just use a separate tool for syncing. scp(1) works. rsync(1) works better. unison(1) beats everything.
You can’t really call RCS a ‘repository’. It is, after all, just one ‘,v’ file for the version history of a single file. You can setup rsync or unison to sync up ‘,v’ files exclusively, which essentially transforms rcs to a hand-rolled cvs.
There is one aspect where Ed maybe has an actual advantage: It keeps you in write mode and discourages editing. I will consider using Ed for journalling where I currently use vim.
There is one aspect where Ed maybe has an actual advantage: It keeps you in write mode and discourages editing.
cat > $filename will do that, too, but with ed I can switch back to command mode, save what I’ve done so far, and then continue by returning to append mode.
Though I could probably do the same with cat >> $filename, but I’m afraid I’d forget that I need to type > twice to append and end up overwriting the file. :)
This is why I prefer writing drafts in a chat with myself. Also because of the enforced pacing: the rhythm of hitting Enter when a line is done, and the leaving it as it is.
That you know tools and processes that work for you is great. But it doesn’t sound like you have the best ideas about when to use them.
You say you got decent work done while your wife was talking with her friends at dinner. What they saw was someone tuning their presence out to do what they’d really wanted.
If you’re gonna be there, be there.
There are a few details to my story that I had left out because I didn’t think they were relevant. You just made them relevant.
Do you usually give out unsolicited etiquette advice online, or should I be flattered?
It’s advice, we don’t know the whole story.
I’m thankful when someone online is forward and seems genuinely interested in giving helpful etiquette advice. Unsolicited is the only solution if I don’t know I’m being rude.
Hah, I thought the same. It’s funny how most people will not put up with someone opening up their laptop in the restaurant but we don’t bat an eye when we start using smart phones.
I’m not going to defend smart phone usage and will call my friends out for using them at the table (in a friendly manner, of course), but the difference of degree between pulling out your phone and pulling out a laptop is so large it becomes a difference of kind.
I guess it only depends of the intent. If it’s just to write your thoughts quickly not to forget something, then a notebook is as intrusive in a dinner as a smartphone or a laptop.
Just in case anybody is still unenlightened by Ed
I’ve got that book. It’s an excellent supplement to the manual page.
To my knowledge, jupp was and probably remains the best modern “WordStar family” editor.
Write&Set was an interesting (commercial and proprietary) system, but it doesn’t appear to have been updated lately and never had releases from or anything but Windows and OS/2.
(Edit: Seems I was mistaken. There is a recent release of WSedit which includes Linux and OS X ports; it is still a proprietary program.)
–
Interestingly, Neal Stephenson is a huge fan of using Emacs for writing fiction - he refers to Emacs as his “thermonuclear word processor.” (Edit: Tony Ballantyne is another Emacs evangelist. George R. R. Martin, however is still known to be a WordStar partisan.)
I was always a WordPerfect user - I used it on VMS, DOS, and NeXT - and to this day, keystrokes like Shift-F7, F7 to print and close and F2 to search are permanently burned into my brain and my muscle memory. WordPerfect 5.1 would still rate very highly if I was asked to create a list of the best software ever written.
I’ve been using joe 4.5 and 4.6, and it’s jstar mode is good enough that I haven’t been tempted by jupp.
Sans-screen will be mostly relaxing and enjoying the fantastic weather we’ve been having. Maybe get together with some friends for a hike.
Screen-wise I’m gonna start work on a cross-platform text expander. I use OSX at work and Arch at home and it bugs me that there isn’t a cross platform solution there. Main goals are that it works on those platforms, can sync with a snippet repo (so updates bridge computers), and that snippets are scriptable so you can dynamically have pieces filled in.
@rocx mentioned M4, and while it’s kinda old and hairy the GNU version might be what you need.
I’ll probably take my wife to see Jurassic World: Fallen Kingdom this weekend. She loves those movies, and since she had breast cancer and is going through chemotherapy to mitigate the risk of recurring tumors, it’s important to keep her morale up.
I’ve also been tinkering with building my own OpenBSD static website generator using make, sed, lowdown, sassc, and dateutils. It’ll use my ~/.plan file as a non-social blog, and also pull in ~/.project.
Using sed will let me take advantage of lowdown’s ability to extract metadata and convert markdown files without wrapping them in stand-alone HTML files to populate templates.
I’ve timed both sass and sassc using the time command, and sassc appears to be faster.
I’m pulling in dateutils so I can store timestamps in variables and convert them to arbitrary formats.
I like what Roman Zolotarev did with his ssg script, but his implementation seems blog-oriented, and I want to get away from blogs and party like it’s 1999. Rather than try to make his script work the way I want it to, I’ve been studying it as a reference implementation so I can do it my way. :)
Also, I want to see if I can get better performance by using make -j. It seems most static site generators process pages sequentially, but that seems inefficient when I’ve got an 8-core machine and 8GB of RAM.
Good luck on that generator. I tried the same thing but primarily with M4. Would not recommend that path. You could simplify your generator into markdown content.md |cat head.htm - foot.htm >content.htm in the end.
Thanks. I know I could use cat to simplify generation, but I’ve already figured out how to populate HTML templates using sed. It’s more complex, but also more powerful since I can chain multiple operations into a single command.
I had originally started out by writing a shell script, but once I was ready to loop through multiple files I realized that a shell script wasn’t really the best tool for the job, and that I might have a better time if I use make.
This way I can tell my wife that the ten bucks I spent on a used copy of sed & awk from O’Reilly Press wasn’t wasted. :)
Already got a solid desktop feed reader, but I’ll keep an eye on this for my wife’s sake. She’s always griping about how there’s never any decent news on her phone, but won’t consider using a feed reader. It might be worthwhile to borrow her phone while she’s sleeping, install the Android app once you have one available, and set up some feeds that aren’t full of clickbait.
I’ve been using Newsboat and the now-defunct Newbeuter that it forked from for about ten years. Back when I was posting a dozen stories a day on Lobsters, the majority came from tracking 400+ feeds. Coming from vim and mutt it feels very comfortable. I like that it has near-instant response to keystrokes and no images, I can very quickly skim through hundreds of posts for the handful that are interesting.
It does, unfortunately, have two bugs. One is a crash I’ve seen a few times about a corrupt doubly-linked list, the other is a recent annoyance with custom keys that I’ve just reported, so thanks for that reminder.
If it helps any, here’s my current config:
# no automatic reloading
refresh-on-startup no
auto-reload no
reload-time 360 # minutes
# reloading
reload-threads 8
reload-only-visible-feeds no
show-read-feeds no
download-retries 4
# notification
notify-screen yes
notify-xterm yes
# storage
max-items 5000
# display
article-sort-order date-desc
feedlist-format "%S%n %11u %t"
articlelist-format "%D %f %?T?;%-17T; ?%t"
datetime-format %m-%d
color background white black
color listnormal white black
color listfocus black white
color info black white
color article white black
# interface
confirm-exit yes
bind-key k up
bind-key j down
unbind-key o
bind-key o open-in-browser-and-mark-read
bind-key O open-in-browser
bind-key a open-all-unread-in-browser-and-mark-read
I’ve never used Thunderbird as a feed reader. I don’t even use it for mail; when I want a graphical mail client I use Claws Mail. :)
I’ve used claws before but, I really like Thunderbird right now because it also integrates nicely with Firefox.
I hope the shop this guy works for isn’t using Microsoft SQL Server. That’s the only justification I can think of right now for writing custom ETL code instead of using SQL Server Integration Services, or any of the other tools SQL Server provides for handling bulk import/export.
This leaves out a pretty important part of work: you work on a team. Increasingly it’s acceptable for people to work hours that suit them, and for many people that means coming in at 10 or 11. That means they are staying later and they are probably most productive around 3 or 4 or 5. That means they’ll be dropping the most PRs on you then or asking the most questions.
That isn’t to say that this suggestion won’t work, but you probably can’t just institute it and call it a day. The post doesn’t even mention colleagues or teams.
This leaves out a pretty important part of work: you work on a team.
I don’t think it matters whether you work 9-5 or 11-7. If other people on the team are working within a certain time period (such as 11-7), then by all means try to accommodate them by adjusting your hours to overlap with theirs to the extent that doing so doesn’t impact your productivity or get in the way of the rest of your life.
The fundamental principle is to do a solid day’s work in eight hours or less because unpaid overtime is for suckers. Not only are you not getting paid for the extra hours when you draw a salary, but working more than 40 hours a week reduces the amount of money you earn per hour.
unpaid overtime is for suckers
It’s not only stupid, but unethical too. If somebody works overtime without pay, it creates pressure for other workers to do it as well. If you do it regularly, your output gets worse, which means that your employer benefits nothing either. It’s just loss/loss.
I know that. You know that. Managers refuse to know it. They’d rather make wild promises, letting their egos cut checks that their own asses won’t be called upon to cash.
This was my take too. 9 and 5 are arbitrary fence posts. The key here is working an 8ish hour day and not a 10ish or 12ish hour day.
4-6 hours would be better, IMO, but I find myself turning into some kind of dirty long-haired pinko as I approach middle age.
I would agree if the workday were actually one solid block of nothing but writing code or thinking about writing code. However in the real world (or at least MY real world) the workday consists of that plus a whole host of scheduled and unscheduled interruptions like meetings, chats with manager and coworkers, etc.
When you add in those things, a 4-6 hour workday starts to look kinda sketchy :)
I don’t think it’s sketchy. I think it’s something we should have forced down management’s throat in the 1960s. In the meantime, when you add in the bullshit that comes with a coding job, you end up with an eight hour workday.
For teams, I think it’s fundamental to estabilish a common ground from the get go. I feel that team members should (ideally) agree on a (flexible as much as possible) schedule that accomodates everyone needs, instead of just individually decide which work hours suite them. Personally, I think that, when other team members depends on some measure of your availability, showing up “whenever you feel like it” is a sign of lack of respect for your peers (and I won’t allow it on my team).
My team is doing mostly 10-8 (so working more than the 8h/d). Now I usually do 8-4/5 (depending on the work pressure, my commitments, if I took an additional personal time at lunch break …) if a team member throws a PR when I have to leave, I have absolutely no scruples to let it for tomorrow. Once or twice some asked for a review when I was leaving. To that you just have to answer that you’re leaving because you called it a day and that except if it’s critical to have it reviewed it today, it can probably wait for tomorrow.
To me the teams are not an issue as long as you communicate.
In my experience it’s better to let important reviews wait for the morning, when my judgement is clear, rather than wave them through at when I’m tired.
One thing you might find interesting is IBM i’s command language. Arguments to commands are named and typed, and one very interesting property is that you can hit the F4 key and pop up a form with the command’s available options; and prompt further into those, with pop-up help. It then creates the command line to run. This series of toots is probably the best quick primer on why it’s interesting.
Every time someone mentions VMS, AS/400, AIX, HP-UX I wonder if there is any way to goof around these systems to see for myself the differences from the current mainstream servers.
There’s an outfit called VMS Software that claims to be working on an x86_64 OpenVMS port. According to this roadmap document from 2017 they expect to have OpenVMS 9.2 ready for production on x86_64 sometime in 2020. It’ll still be proprietary, of course.
There’s a hobbyist program for OpenVMS to get licenses. Gotta get an emulator or used hardware on eBay from there. Im not sure about the rest.
As a junior developer doing my best to learn as much as I can, both technically and in terms of engineering maturity, I’d love to hear what some of the veterans here have found useful in their own careers for getting the most out of their jobs, projects, and time.
Anything from specific techniques as in this post to general mindset and approach would be most welcome.
Several essentials have made a disproportionate benefit on my career. In no order:
These have had an immense effect on my abilities. They’ve helped me navigate away from burnout and cultivated a strong intrinsic motivation that has lasted over ten years.
Thank you for these suggestions!
Would you mind expanding on the ‘be political’ point? Do you mean to be involved in the ‘organizational politics’ where you work? Or in terms of advocating for your own advancement, ensuring that you properly get credit for what you work on, etc?
Being political is all about everything that happens outside the editor. Working with people, “managing up”, figuring out the “real requirements’, those are all political.
Being political is always ensuring you do one-on-ones, because employees who do them are more likely to get higher raises. It’s understanding that marketing is often reality, and you are your only marketing department.
This doesn’t mean put anyone else down, but be your best you, and make sure decision makers know it.
Basically, politics means having visibility in the company and making sure you’re managing your reputation and image.
A few more random bits:
start a habit of programming to learn for 15 minutes a day, every day
Can you give an example? So many days I sit down after work or before in front of my computer. I want to do something, but my mind is like, “What should I program right now?”
As you can probably guess nothing gets programmed. Sigh. I’m hopeless.
Having a plan before you sit down is crucial. If you sit and putter, you’ll not actually improve, you’ll do what’s easy.
I love courses and books. I also love picking a topic to research and writing about it.
Some of my favorite courses:
I’ve actually started SICP and even bought the hard copy a couple weeks ago. I’ve read the first chapter and started the problems. I’m on 1.11 at the moment. I also started the Stanford 193P course as something a bit easier and “fun” to keep variety.
One thing that I’ve applied in my career is that saying, “never be the smartest person in the room.” When things get too easy/routine, I try to switch roles. I’ve been lucky enough to work at a small company that grew very big, so I had the opportunity to work on a variety of things; backend services, desktop clients, mobile clients, embedded libraries. I was very scared every time I asked, because I felt like I was in over my head. I guess change is always a bit scary. But every time, it put some fun back into my job, and I learned a lot from working with people with entirely different skill sets and expertise.
I don’t have much experience either but to me the best choice that I felt in the last year was stop worrying about how good a programmer I was and focus on how to enjoy life.
We have one life don’t let anxieties come into play, even if you intellectually think working more should help you.
This isn’t exactly what you’re asking for, but, something to consider. Someone who knows how to code reasonably well and something else are more valuable than someone who just codes. You become less interchangeable, and therefore less replaceable. There’s tons of work that people who purely code don’t want to do, but find very valuable. For me, that’s documentation. I got my current job because people love having docs, but hate writing docs. I’ve never found myself without multiple options every time I’ve ever looked for work. I know someone else who did this, but it was “be fluent In Japanese.” Japanese companies love people who are bilingual with English. It made his resume stand out.
. I got my current job because people love having docs, but hate writing docs.
Your greatest skill in my eyes is how you interact with people online as a community lead. You have a great style for it. Docs are certainly important, too. I’d have guessed they hired you for the first set of skills rather than docs, though. So, that’s a surprise for me. Did you use one to pivot into the other or what?
Thanks. It’s been a long road; I used to be a pretty major asshole to be honest.
My job description is 100% docs. The community stuff is just a thing I do. It’s not a part of my deliverables at all. I’ve just been commenting on the internet for a very long time; I had a five digit slashdot ID, etc etc. Writing comments on tech-oriented forums is just a part of who I am at this point.
Four things:
People will remember you for your big projects (whether successful or not) as well as tiny projects that scratch an itch. Make room for the tiny fixes that are bothering everyone; the resulting lift in mood will energize the whole team. I once had a very senior engineer tell me my entire business trip to Paris was worth it because I made a one-line git fix to a CI system that was bothering the team out there. A cron job I wrote in an afternoon at an internship ended up dwarfing my ‘real’ project in terms of usefulness to the company and won me extra contract work after the internship ended.
Pay attention to the people who are effective at ‘leaving their work at work.’ The people best able to handle the persistent, creeping stress of knowledge work are the ones who transform as soon as the workday is done. It’s helpful to see this in person, especially seeing a deeply frustrated person stand up and cheerfully go “okay! That’ll have to wait for tomorrow.” Trust that your subconscious will take care of any lingering hard problems, and learn to be okay leaving a work in progress to enjoy yourself.
Having a variety of backgrounds is extremely useful for an engineering team. I studied electrical engineering in college and the resulting knowledge of probability and signal processing helped me in environments where the rest of the team had a more traditional CS background. This applies to backgrounds in fields outside engineering as well: art, history, literature, etc will give you different perspectives and abilities that you can use to your advantage. I once saw a presentation about using art critique principles to guide your code reviews. Inspiration can come from anywhere; the more viewpoints you have in your toolbelt the better.
Learn about the concept of the ‘asshole filter’ (safe for work). In a nutshell, if you give people who violate your boundaries special treatment (e.g. a coworker who texts you on your vacation to fix a noncritical problem gets their problem fixed) then you are training people to violate your boundaries. You need to make sure that people who do things ‘the right way’ (in this case, waiting for when you get back or finding someone else to fix it) get priority, so that over time people you train people to respect you and your boundaries.
I once saw a presentation about using art critique principles to guide your code reviews. Inspiration can come from anywhere; the more viewpoints you have in your toolbelt the better.
The methodology from that talk is here: http://codecrit.com/methodology.html
I would change “If the code doesn’t work, we shouldn’t be reviewing it”. There is a place for code review of not-done work, of the form “this is the direction I’m starting to go in…what do you think”. This can save a lot of wasted effort.
The biggest mistake I see junior (and senior) developers make is key mashing. Slow down, understand a problem, untangle the dependent systems, and don’t just guess at what the problem is. Read the code, understand it. Read the code of the underlying systems that you’re interacting with, and understand it. Only then, make an attempt at fixing the bug.
Stabs in the dark are easy. They may even work around problems. But clean, correct, and easy to understand fixes require understanding.
Another thing that helps is the willingness to dig into something you’re obsessed with even if it is deemed not super important by everyone around you. eg. if you find a library / language / project you find fun and seem to get obsessed with, that’s great, keep going at it and don’t let the existential “should i be here” or other “is everyone around me doing this too / recommending this” questions slow you down. You’ll probably get on some interesting adventures.
Never pass up a chance to be social with your team/other coworkers. Those relationships you build can benefit you as much as your work output.
(This doesn’t mean you compromise your values in any way, of course. But the social element is vitally important!)
After twenty years of working as a developer, I’ve come to the conclusion that daily standups and other rituals do not exist for the benefit of developers. Furthermore, I have never been to a meeting that could not have been replaced by a brief email exchange.
Never use “typedef struct foo FOO”
My C-fu is pretty weak, occasionally write it in hobby code, but I’ve seen it done in projects from Suckless and code from the Vis editor, which are my references for ‘good c code’. Why do they recommend against it?
Linus spells out the Linux approach in these emails.
The short version is: don’t use a type abstraction where you don’t need one, nothing is wrong with typing ‘struct xxx’.
One of the emails in the link, on where typedefs are useful:
(a) totally opaque objects (where the typedef is actively used to _hide_
what the object is).
Example: "pte_t" etc opaque objects that you can only access using
the proper accessor functions.
NOTE! Opaqueness and "accessor functions" are not good in themselves.
The reason we have them for things like pte_t etc is that there
really is absolutely _zero_ portably accessible information there.
I’m trying to convince my workplace to get rid of whiteboarding interviews, does anyone know if there are resources for ideas of alternatives? Anyone have a creative non-whiteboarding interview they’d like to share?
The best that I’ve found is to just ask them to explain some tech that’s listed on their resume. You’ll really quickly be able to tell if its something they understand or not.
My team does basic networking related stuff and my first question for anyone that lists experience with network protocols is to ask them to explain the difference between TCP and UDP. A surprising number of people really flounder on that despite listing 5+ years of implementing network protocols.
This is what I’ve done too. Every developer I’ve ever interviewed, we kept the conversation to 30min-1hr and very conversational. A few questions about, say, Angular if it was listed on their resume, but not questions without any context. It would usually be like- “so what projects are you working on right now? Oh, interesting, how are you solving state management?” etc. Then I could relate that to a project we currently had at work so they could get a sense of what the work would be like. The rapid-fire technical questions I’ve find are quite off-putting to candidates (and off-putting to me when I’ve been asked them like that).
As a side note, any company that interviews me in this conversational style (a conversation like a real human being) automatically gets pushed to the top of my list.
Seconded. Soft interviewing can go a long way. “You put Ada and Assembler on your CV? Oh, you just read about Ada once and you can’t remember which architecture you wrote your assembly for?”
I often flunk questions like that on things I know. This is because a question like that comes without context. If such a problem comes up when I’m building something, I have the context and then I remember.
I don’t think any networking specialist would not know the difference between TCP and UDP, though. That sounds like a pretty clear case of someone embellishing their CV.
So if you can’t whiteboard and you can’t talk about your experience, what options are left? Crystal ball?
I like work examples, open ended coding challenges: Here’s a problem, work on it when you like, how you like, come back in a week and lets discuss the solution. We’ve crafted the problem to match our domain of work.
In an interview I also look out for signs of hostility on the part of the interviewer, suggesting that may not be a good place for me to work.
A sample of actual work expected of the prospective employee is fair. There are pros and cons to whether it should be given ahead of time or only shown there, but I lean towards giving it out in advance of the interview and having the candidate talk it through.
Note that this can be a hard sell, as it requires humility on the part of the individual and the institution. If your organization supports an e-commerce platform, you probably don’t get to quiz people on quicksort’s worst-case algorithmic complexity.
I certainly don’t have code just sitting around I could call a sample of actual work. The software I write for myself isn’t written in the way I’d write software for someone else. I write software for myself in Haskell using twenty type system extensions or in Python using a single generator comprehension. It’s for fun. The code I’ve written for work is the intellectual and physical copy of my previous employers, and I couldn’t present a sample even if I had access to it, which I don’t.
Yup, the code I write for myself is either 1) something quick and ugly just to solve a problem 2) me learning a new language or API. The latter is usually a bunch of basic exercises. Neither really show my skills in a meaningful way. Maybe I shouldn’t just throw things on GitHub for the hell of it.
Oh, I think you misinterpreted me. I want the employer to give the employee some sample work to do ahead of time, and then talk to it in person.
As you said, unfortunately, the portfolio approach is more difficult for many people.
Perhaps in the future we will see people taking on side projects specifically in order to get the attention of prospective employers.
I recently went through a week of interviewing as the conclusion of the Triplebyte process, and I ended up enjoying 3 of the 4 interviews. There were going to be 5, but there was a scheduling issue on the company’s part. The one I didn’t enjoy involved white board coding. I’ll tell you about the other three.
To put all of this into perspective, I’m a junior engineer with no experience outside of internships, which I imagine puts me into the “relatively easy to interview” bucket, but maybe that’s just my perception.
The first one actually involved no coding whatsoever, which surprised me going in. Of the three technical interviews, two were systems design questions. Structured well, I enjoy these types of questions. Start with the high level description of what’s to be accomplished, come up with the initial design as if there was no load or tricky features to worry about, then add stresses to the problem. Higher volume. New features. New requirements. Dive into the parts that you understand well, talk about how you’d find the right answer for areas you don’t understand as deeply. The other question was a coding design question, centered around data structures and algorithms you’d use to implement a complex, non-distributed application.
The other two companies each had a design question as well, but each also included two coding questions. One company had a laptop prepared for me to use to code up a solution to the problem, and the other had me bring my own computer to solve the questions. In each case, the problem was solvable in an hour, including tests, but getting it to the point of being fully production ready wasn’t feasible, so there was room to stretch.
By the time I got to the fourth company and actually had to write code with a marker on a whiteboard I was shocked at how uncomfortable it felt in comparison. One of my interviews was pretty hostile, which didn’t help at all, but still, there are many, far better alternatives.
I’m a little surprised that they asked you systems design questions, since I’ve been generally advised not to do that to people with little experience. But it sounds like you enjoyed those?
There are extensive resources to help with the evangelism side of things.