The only issue I have with lodash is that a typical npm install for any significant project that I've worked on will pull in approximately 87 different copies of it, up and down the dependency tree, of nearly every release that is still accessible.
A standard library that wasn't so anemic would be a grand thing.
Lodash has two values, a bunch of utility functions and it works cross browser. The most common utility functions are now standard issue in es6+. And a transpilation build process is a superior way of dealing with cross browser incompatibilities. Babel + browserlist + caniuse all work seamlessly to ensure you only have the polyfills and browser support you need, vs the one-size-fits-all approach of lodash.
There's probably a handful of functions in lodash that are still useful but why take on the security risk and maintenance of another package dependency if you can just copy a couple ten-liners into your own utils folder? It's not like the world is going to come up with a more performant debounce anytime soon.
I guess lodash also relies on jquery which is in the same boat. es6+ has stolen a lot of its thunder and target-aware transpilation is a better approach to cross browser support
I have more nuanced takes on lodash too but I'm putting them in another reply to separate them from the big picture stuff I already mentioned.
Lodash also differs from the standard lib's implementation, notably it's too permissive. Take this example:
const uhoh = null
_.forEach(uhoh, () => {})
uhoh.forEach(() => {})
lodash's forEach has no problem running on a falsey value (it gives you back the value) whereas standard lib leads you to a TypeError.
Two thoughts here. The standard lib forces the programmer to think more about types, which is a good thing. Second is that lodash's more loosey goosey approach acts as vendor lock-in. In two years, when there's 60 lines and 3 files of separation btwn uhoh's assignment and the _.forEach invocation, you won't know whether it's expected to be null or not. So you won't know if you should replace the code with
The standard library has replaced much of lodash's array utilities but seeing as you can import lodash functions into your project piecemeal it's still useful for the odd utility function here and there.
Ramada.js is geared around making partial function application easy to do. In general, the utitility functions accept any helper callbacks first, and input data last, and automatically generate a partially applied function if you skip any trailing arguments.
For those of you coming from the Java / C++ / Simula 67 culture, this level of brevity may take some getting used to :-)
Ramda does a really good job of helping you “Stop Writing Classes”, composing functions instead.
The land is probably more valuable than the building configuration. It's a little different from the pipe example in that way. You can't easily tear up the pipes and do something else with the pipeway, but you could demolish a mall and build an entire live/work district.
Pipelines offer uninterrupted right-of-way continuity from point to point. Shopping malls are distinctly noncontinuous, and better resemble ports (which is what they are).
That's the tricky bit in physically-routed infrastructure: pipelines, canals, rail, expressways, media (vs. transmission-based) comms links. None of them abide well with airgapping.
The comms-transport link goes back at least to the rail era when telegraph lines sprang up along them. You might have heard of one such venture: the Southern Pacific Railroad Internal Network Telecommunications, better known as SPRINT.
Some comment here on HN a month or so ago clarified this for me. It's more efficient to have a delivery truck go around to ten different houses than it is to have each of ten different vehicles drive from their houses to a central location.
Now if only there were some way to do that with people, not just with stuff (cough mumble public transit cough).
Stopped using any feature with infinite scroll implemented. It's the common thread between social media feeds, app store lists, streaming services, etc. For sites like HN I stop after the first page.
I was bored at first but then I started filling my time with more productive hobbies, which was the point. Infinite content providers are designed to steal all your time.
It's crazy how little I use the internet now. I never realized what it had become until I put some restrictions in place that ended up blocking out like 90% of the web.
Relevant for those who don't want to get rid of infinite scroll sites completely:
When opening such site, go several pages down immediately and work your way up instead of down. That way, you have a clear end and you've decided already how much time you want to spend there and can just quit when you get to the first post.
I was on all the social media but took the plunge and deleted them all.
Some things I visited to blow time like imgur have infinite scroll in their apps but are paginated on their mobile site, so I just visit the mobile site and stop after one page. I had disabled infinite scroll in RES at first but eventually left Reddit altogether.
I no longer browse app stores, Netflix, hulu, etc. I already know what I want to watch and search for it directly.
I like to keep evergreen lists for everything too, I'm curious what software you're using? I've shoehorned lists into evernote and trello before but ultimately their uis are about doing something else
Just like SF has microclimates for weather it also has them for compartmentalizing the city's various problems. Fidi and east cut (or whatever realtors are calling it now) don't have feces, needle, and tent problems. It does have scooter litter problems. The city population swells 2x every work day and the majority of those workers interact with scooters parked haphazardly.
If it's one thing entitled early adopters and east bay commuters have in common, it's that they DGAF about the sense of community in SF. So they park these things in the most selfish ways possible. I swear some of them have to be doing it on purpose. I've seen them blocking turn styles at embarcadero station before.
I had a friend visiting from out of state and usually the first criticism of SF I hear is something about homelessness as we pass through the 'loin. But this time we were by embarcadero and it was "did a scooter gang of children all get raptured at once?"
The article really undersells criticism #2 (they block sidewalks). In their short time in SF I saw scooters laying down in the middle of sidewalks, blocking bus stop curbs, left in tight construction corridors, left in front of building entrances and leaned in front of muni turnstiles.
People also take a wide berth around the scooters so they congest sidewalks even if leaned to one side.
If they come back I hope they do it by replacing the stupid bike docking stations with scooter docking stations. Scooters are a better fit for that model. Pay homeless ppl to return them to the docks and solve two SF problems at once
I think you can get by with adding timestamp support to a single feature flag. So the code has IS_PREMIUM everywhere but when you add a new use of it you also manually record the time. Since you know the expiration time of their license you can always determine what features are unlocked based on that.
Then you just develop the app as any other demo-with-upsell app. Users even continue to get bug fixes and other updates after they let the license lapse.
In cases where features are removed, combined, refactored, you'll have to be judicious about what timestamp you apply to the refactor. I would resolve in the customer's favor personally.
Edit: Thinking on this more you might also want a rule like feature flags are only implemented at the view layer. That way your biz logic never gets tripped up on flag checks as features cross paths under the sheets. So its does require a fair amount of code discipline to pull this off
Not an external resource but I've identified that there are thought tools I continually apply in my own thinking to gain new perspective. I started writing them down and organizing them which has immediately benefited me and maybe one day I'll have distilled them clearly enough to share with others. Kind of like a toolbox for the mind.
Anyway, my advice is write down your own thoughts and discoveries. You'd be surprised how much content there is when you start collecting it all in one place and it will help you be more critical of your inner workings
They all start with the idea of monetizing an underused resource (cars, houses, curbsides) with a novel business model whose goal is to dance around existing laws.
I don't know of a word that captures what feels like an arbitrage-ish assault on our law books. Without knowing that word I can only suggest something too generalized like organized crime economy
Houses aren't "underused" in many cities on Earth, there's simply a huge price discrepancy between hotels and Airbnb/residential rent. My landlord kicked me out[1] simply saying he's going to use it as an Airbnb instead. Even if he only rented it a few days a week it would be far more profitable, it was rough personally but I don't blame the guy. Holiday season garners absurd amounts in that area and would make a months worth of rent in a matter of days.
[1] No grounds eviction is completely legal in Sydney/NSW.
I used Haxe and NME years ago to build an Ouya (RIP) game. I was coming from actionscript and it was a delightful language. Glad to see it's still evolving. That game project was a blur of haxe, java, and c++ due to Ouya's infancy and haxe could handle it all. I was impressed
This one is even easier to spot because it recommends lodash in 2018