2,515 karma · joined Mar 4, 2010 (16y ago) · 549 submissions
meet.hn/city/43.1009031,-75.2326641/City-of-Utica
---
comment 3y ago · link · parent
Mostly I was thinking about stuff like arrangements of hashes, arrays, method arguments, naming of methods and variables, various styles of method chaining, block usage, etc.
comment 3y ago · link · parent
comment 3y ago · link · parent
comment 3y ago · link · parent
comment 3y ago · link · parent
comment 3y ago · link · parent
Of course I'm talking about 95% of the apps where this is acceptable, not 5% where table locking can cause problems, leading to the need for concurrent update handling.
comment 3y ago · link · parent
comment 3y ago · link · parent
Disclaimer: I wrote the linked article for that solution.
comment 3y ago · link · parent
I wouldn't discount the importance of clarity in the way you code. You might end up writing the right solution, but because you didn't communicate "what", "how", and "why" clearly enough in your codebase, you will setup other developers (and potentially the business) for failure.
comment 3y ago · link · parent
Now that they're announcing Savings, I'm thinking to re-evaluate my Ally savings account. Apple's is better, but I'm already seeing mentions of Betterment, Robinhood, and Wealthfront here. What I'm looking for is a no-fee, high yield, good FDIC insurance. I'm also looking to start a long-term investment account for my young kid, and it would probably be convenient if I could do them both with the same bank.
Any recommendations?
comment 3y ago · link · parent
Now imagine an average patient, like a mom with 7 kids that doesn’t speak English, or a 16 year old dad who smells intensely of pot. Vast majority of the patients are very different than our engineering bubbles, and doctors are humans who are trying their best.
For people who are willing to have a deeper conversation, some doctors will engage more meaningfully. But most of the process for doctors is to give you instructions to follow, then when you report back, alter them, or proceed as before.
Most people try the first thing doctor asked, and if it didn’t immediately work, change it themselves, and/or go to a new doctor. Then complain how they’ve been to 12 doctors and nobody helped, but then they stumbled on some YouTube guy who said to take 5000mg of vitamin C every 2 hours, and their back pain went away (hint: it went away on its own).
comment 3y ago · link · parent
It depends on how exactly it was taken into one’s hands right? Can’t really know if it’s pro-science or anti-science until you see what a person is doing. Most people do pretty irrational stuff, based on stories of a doctor in my family.
comment 3y ago · link · parent
Unfortunately many engineers (and humans generally) can't easily recognize and articulate what they need. One theory of mine is that we assign senior-sounding roles in this industry too readily. "Senior engineer" sounds like they would know how to handle this, but while they might be great at programming, they often have little experience recognizing their own limitations, asking for help/resources, and understanding that this level of self-awareness and focus on outcomes would make them look better, not worse.
If I was to give one piece of advice to an engineer in a similar position: you will always look more mature and professional if you evaluate your situation and explain what sort of help you need, than if you silently keep burning yourself out while the quality keeps slipping.
If you're management and you actually reprimand them for asking for help, you will have trouble retaining engineers. It would be justifiable for them to look for work elsewhere on these grounds.
comment 3y ago · link · parent
comment 3y ago · link · parent
comment 3y ago · link · parent
(People who like gym risk not going when they don't like it. I have no such risk. I'm not tethered to liking.)
But here's the real trick: if you can afford it, get a personal trainer.
Pick a cadence (e.g. Mon/Wed/Fri or Tue/Thu/Sat), deliver yourself to the location no matter what, and let trainer take over from there.
comment 3y ago · link · parent
comment 3y ago · link · parent
One of such things is "screaming architecture". It is a good idea in theory, but only if you already know what the architecture should be. Most new projects don't know what they need up front, and discovery happens over time. Screaming architecture is bad for this process. It inhibits it, requiring a ton of refactoring because of early assumptions. One thing that is known up front is entry points. (CLI, requests, tests, bg jobs). They're a lot more likely to stay around forever. Custom architecture should emerge underneath them. I guess we can call it whispering architecture.
comment 3y ago · link · parent
1. An odd business requirement (share the origin story)
2. It took research (summarize with links)
3. Multiple options were considered (justify decision)
4. Question in a code review (answer in a comment)
comment 3y ago · link · parent
comment 3y ago · link · parent
It wasn't lack of defaults, it was handling of defaults. Portrayal does a couple of smart things like evaluating defaults in a specific order in the correct context (while still only evaluating once), such that this becomes possible:
keyword :name
keyword :greeting, default: proc { "Hello, #{name}" }
I like being able to do this. (This also works gracefully with subclassing.)The coercion argument is good, but I'm not a fan of doing it implicitly. (This was the real counter-argument I should've made). I prefer to have a single place where input is entirely processed, such as a `from_params(params)`-style constructor. In that constructor you could either coerce, or do anything else with the input prior to passing it through to `.new`.
comment 3y ago · link · parent
If you setup your Go app structure like a Rails app structure (basically what clean architecture is), then you have it covered. However, I believe you do have to set it up by hand each time in Go, or write your own generators.
> It is probably good for teams that have "fresh" employees like folks out of college or something to quickly be up to speed without having to hand hold too much.
Architecturally speaking, yes and no. Rails does a lot of non-obvious (to new devs) things for very good reasons, that these devs would have to spend quite a bit of time to understand. Try to write Rails without knowing all the wheres and whys, and you will quickly become frustrated. In Go, you can kinda guide new devs along as you build out most things from scratch. Both of these situations require guidance from experts.
Syntactically speaking, the opposite is true. Ruby lets you write incredibly expressive code by giving you nearly limitless flexibility. In newbie hands this could become a disaster.
It's a common misconception that Rails is beginner-friendly. Its authors have been trying to correct the record on that, by using sharp knife analogies. You have to be very careful with Ruby and Rails, since there aren't nearly the same guardrails as you get with Go.
comment 3y ago · link · parent
1. REPL. Huge. You can be insanely productive with it. If you're integrating with APIs and therefore dealing with complex nested data structs, you can explore them live. You can explore what's possible with any lib, try things before you write any code. You can also debug errors on the fly as soon as they occurred, right in the browser.
2. Your app is organized around entry points by default. Nobody knows the proper architecture up front for a brand new application. Rails gives you rake tasks for CLI, controller actions for web requests, ActiveJob as a convention for background jobs. You can grow your app's inner architecture over time, but you got all the entry points laid out up front, and they rarely ever change.
3. A lot of built-in security risk mitigation. Cross-site request forgery, encryption for cookies and sessions, convenient encrypted configs and secrets, log filtering functionality, escaping everything by default, and many more. Everything is already handled out of the box.
4. Veteran open source packages (gems) with large companies sponsoring maintenance. Decades of dev and polish on most needed gems, still going.
5. Analytics and monitoring out of the box. Completely wired for tracking performance of everything out of the box. No need to manually integrate performance trackers, just one-line install and you have full profiling capabilities of every part of the app, with many popular dashboard services.
6. Error monitoring out of the box. Many ways to notify exceptions via chats, email, and services, with typically zero integration work.
7. Completely thought-out testing environment out of the box, for both integration and isolated testing. Clean slate on every test without manual setup.
8. Lots of Ruby and Rails tools/functions (e.g. Enumerable) for transforming data via functional pipelines (select, reject, tally, map, take_while, etc) out of the box.
9. Ability to write incredibly reusable code to solve a problem for all data types, not just one particular type (this has gotten better in Go with generics).
comment 3y ago · link · parent
comment 3y ago · link · parent
comment 3y ago · link · parent