One thing I just can't live without, however, is a code formatter. Formatting code by hand is tedious and repetitive and I have no patience for it.
527 karma · joined June 23, 2020
One thing I just can't live without, however, is a code formatter. Formatting code by hand is tedious and repetitive and I have no patience for it.
Do you hold out hope for a similar transition to a better local development workflow? What do you think it might look like?
I didn't join the dots up for this use case though, thanks!
I did wonder with regards to the IP address. If you had a VPN set up for access to a VPC and ran the lambda in that VPC then that would be another option I think. You would just need to configure a static IP for your dev machine within the private network.
That's probably very true (and I'm probably quite guilty of it!).
Thanks for your suggestions, that does sound like a good approach.
I'll check it out!
It would be quite a powerful workflow for running integration tests. I shall do some research!
The operational overhead of provisioning them, configuring them (and so on) is really difficult for a lot of teams though.
It would be great if there was a consistent way to do all of them.
That's pretty neat if so, I might have to try that out. Are there any downsides to this approach do you think?
Thanks for your thoughts on emulators/tests too.
Am I right in saying that they serve a somewhat narrower use case than lambdas though? My understanding is that they are mostly used for things like modifying requests/responses rather than for building a whole backend.
If I'm honest, I do find AWS in general fairly high friction at times but it's way better than renting servers directly I think.
It's the only cloud provider I've really worked with to be honest though (other than a few experiments), maybe some others are much better in this regard?
Cosmotic's comment kind of confirms my suspicions to be honest.
I'm using python mostly atm. I've played around with go/node too (both of which I'm familiar with in and of themselves) and I was thinking about switching over to one of those already.
The dependency management is easier for both of them than with python I found.
As you say, it only does the 'host lambdas locally' bit though. If you wanted to do stuff like test the interactions between lambdas, or test them over HTTP (for lambdas that act as components in REST APIs), you'd need to build something yourself.
http://www.rosettacode.org/wiki/Rosetta_Code
There is a listing of 'tasks' (explore > tasks in the topnav) and each one features submissions in many different languages.
https://www.youtube.com/watch?v=Y2jiQXI6nrE
He was a myth even in his own lifetime but parts of that film hint at the man. It features interviews with many of his old colleagues, discussion of what it was like to work with him, etc.
If you just watch one bit, personally I love the anecdote that begins around here:
https://youtu.be/Y2jiQXI6nrE?t=2604
It is a story of his incredible facility for mental arithmetic that I hadn't heard before. It is arguably one of his least impressive skills but for me it illustrates so clearly the gap between him and his peers.
The title aside, I don't actually disagree with anything in the article. I've had similar experiences to the author with tools like linters and formatters. Agreeing on configuration for them can waste a surprising amount of time.
As time goes on, I do find myself more willing to change to fit my tools rather than change them to fit me. Often, I find the creator of an opinionated tool has more carefully thought through their opinions than I have anyway. Even if they haven't, tools like gofmt showcase the power of consistency for consistency's sake.
That said, I use a tiling window manager and I'm pretty insistent that control belongs where caps lock normally is, so clearly I'm not entirely bought in to my own rhetoric.
As you say, the fact is that we've got all of these standards that can't be be changed without breaking the web. Those standards were also first created for a different time, so it's not surprising that some assumptions turned out to be poor.
As a result, we've ended up in a place where tools treat those standards as compilation targets. This isn't a bad thing per se but it does lead to a lot of complexity in the tool chain.
I think part of why I like tailwind is that it almost feels like I'm using plain old CSS. I get the same amount of flexibility (as much as I need anyway), but I don't feel like there is some great abstraction in between me and the styles I want the framework to produce. At the same time, it's quicker and easier to use.
Anyway, I'm aware it's a pretty divisive tool. I see a lot of strong opinions about it on HN!
EDIT: grammar
One thing I'm using that I've seen crop up on this thread is tailwindcss... I've not used it before but I'm really enjoying it so far. It's not a panacea by any means - it makes no attempt to help you organise your CSS or make it modular so you need to 'bring your own discipline'. For example, it's fairly easy to end up with inconsistent design because it makes it so easy to just add a few custom tweaks here and there. That same feature also makes it easy to duplicate information.
That said, for the first time I feel like I can actually iterate quickly on CSS and design in general. That probably says more about me than CSS but I'm having a blast. The fixed set of choices and short/consistent class names mean that I spend less time reading docs and more time iterating, which is great in my book.
Maybe it's an approach that doesn't scale well to teams? Maybe I'll regret it later? Can't comment on that yet but it has certainly given me a step change in CSS productivity.
The rest of the tech I'm using is all pretty dull, with one exception, which is that I'm using the platform to host itself (the backend at least).
Hopefully this doesn't count as too much of a shameless plug but it certainly fits the bill of a 'different approach' as I'm the only user right now!!
The (very basic) landing page is here:
The first one is a normal mode binding (the n in nnoremap). yiw copies the word you are currently on (without surrounding spaces), and then <C-r>" pastes that into the :Rg command. The :Rg command is part of the fzf vim plugin and it is a wrapper around ripgrep (see the link from climb_stealth), which gives you fuzzy search over the results of a ripgrep search.
There is more detail on the <C-r>" command here:
https://vim.fandom.com/wiki/Paste_registers_in_search_or_col....
It's basically just how you paste the contents of registers into commands.
The second one is almost exactly the same except that it is a visual mode mapping (the v in vnoremap). If you highlight something with visual mode, then use that command, it will search for the highlighted text using ripgrep.
<C-Space> is just the key chord that the command is bound to. It is a pretty arbitrary personal choice, I find it a very quick and easy chord combination but you can put whatever you want in there. For example, <C-S> would activate the command when you pressed the chord 'control + s'.
There is quite a good list of keys that are unused by vim here:
https://vim.fandom.com/wiki/Unused_keys
You can pick whatever you want but I prefer not to override any of the default bindings.
Hope that helps!
My usage of it probably counts as quite basic. That said, I use it constantly. I just love the feeling of real time interaction it gives - it is well and truly part of my muscle memory now.
I use the vim plugin too, which is also brilliant and makes navigating larger projects very quick and easy. I use these two extra bindings all the time:
nnoremap <silent> <C-Space> yiw:Rg <C-r>"<CR>
vnoremap <silent> <C-Space> y:Rg <C-r>"<CR>
They're very simple, but when combined with the ability to add search items to the quickfix list it makes for a pretty powerful workflow.The first one in particular gives a great approximation of symbol search that 'just works' anywhere.