Better HN
topnewbestaskshowjobs
Log inSign up

avg_dev

1,405 karma · joined Oct 28, 2016 (10y ago) · 474 submissions

Submissions

comment 3y ago · link · parent

i find this critique interesting, because i believe the initial momentum behind rails was sparked by a video about how to create a blog using rails without any setup in just a few minutes.

https://www.youtube.com/watch?v=Gzj723LkRJY

comment 3y ago · link · parent

wow lol. Des gustibus non-est disputandum.

i code in go these days. i have done perl and java and some others, started with c, did a bit of python along the way. ruby was always my favorite language. so expressive, so easy to be clear while being terse. i've spent months of my life shortening (my own) verbose ruby code. i switched to go only because of the execution speed and the compilation, a few years back the comparison was not even close. i don't know if i would like to go back to dynamic language... but i found ruby to be such a beautiful language.

p.s. this was big when i was leaving ruby: https://rubocop.org/ maybe there is a replacement now, but maybe it would have changed your view.

comment 3y ago · link · parent

I upvoted this response. It is very thorough and clear. (I can't attest to the veracity of the content but it seems quite logical.) I just wanted to say thanks for writing this. Clearly, these approaches, as you say, are not exactly beginner friendly, but it is great to know that they exist.

comment 3y ago · link · parent

I always enjoy his posts on development.

> Meaningless

>

> Yes GitHub stars is a totally meaning less metric that does not say anything real about a project like curl. It does not reflect usage, it does not reflect popularity and it does not reflect the number of installs out in the real world. It’s just a vanity number.

That made me lol.

comment 3y ago · link · parent

This article resonates deeply with me. I love it.

comment 3y ago · link · parent

I'm not sure that I agree with the poster you are replying to, that Crystal won't take off, but I'm pretty sure that the statement "Crystal has not taken off because Crystal has not taken off" is kind of useful/valid/worthwhile. I believe that this is how network effects work.

I also am pretty sure I read about someone here on HN who used Crystal to build the code for their profitable cookie baking/selling business (the baked goods). I can't recall the details exactly. Edit: Here it is: https://news.ycombinator.com/item?id=23433847

comment 3y ago · link · parent

For future readers: https://crystal-lang.org/

Summary:

- Ruby-inspired syntax

- statically-typed, with built-in type inference

- types are non-nullable, with nullable types represented as a union of a type and nil

- macros built-in including templating, AST inspection, type inspection, ...

- green threads ("fibers") for concurrency

- C-bindings built-in

- package manager built-in ("shards")

(also it is compiled and cross-platform with Windows functionality in some kind of preview/beta that the article author found mostly usable [I think debuggers and the interpreter were exceptions here], and it has a large standard lib)

comment 3y ago · link · parent

Also see this comment: https://news.ycombinator.com/item?id=35828603 :(

comment 3y ago · link · parent

On (3): see https://en.wikipedia.org/wiki/Language_Server_Protocol?wprov...

LSP is pretty well supported in editors; it has emacs and vim and vscode support (a lot of other support as well). It makes it possible for any editor that supports LSP to be language aware (supporting the use of code completion, syntax highlighting, warning and error messages, and refactoring tools, per the Wikipedia article). All that is needed is for someone to implement a language server for the language. I used to use Perl a few years ago and even that had some (slightly buggy) LS implementations, which I found very helpful.

I haven’t used Crystal but I did use Ruby extensively for some time, and having read this and some other articles about Crystal, I’m guessing (2) is well taken care of because of the aim of matching rspec functionality, and (4) by means of being Ruby-influenced. Not sure about (1).

comment 3y ago · link · parent

I agree with the ethos of the article entirely, I think. I personally love taking an organic and experimental and highly incremental approach to pretty much everything.

I feel like the word “putter” has some connotations associated with it that make it misplaced in the article, though. I looked it up in the M-W dictionary and I think that the appropriate definition was the verb:

1: to move or act aimlessly or idly

2: to work at random: tinker

And the “especially” part of the definition of tinker has “unskilled or experimental manner” in it.

Experimental I can get behind. Organic, not necessarily pre-meditated, even. But unskilled? I think that is not what is being aimed at here. This is careful, painstaking work, with attention to details.

A minor quibble to be sure. I still don’t actually know what bearblog.dev is but it must be some kind of place for devs at small software shops to write about their work is my guess, based on the two or three posts I’ve read on the domain name. I’ve enjoyed them all so far.

comment 3y ago · link · parent

Fantastic news. Not so great about the vaping increase. I believe that prohibition is not the way to go at all here.

Former 25+ cigarette a day smoker. It is an addiction and it may start in fun or on a lark, but it pervaded all areas of my life. Being in an airport for a layover and having to leave to smoke and come back through security is a shitty feeling. Running out of - or even running low on - cigarettes regularly created panic in me. I avoided many social activities and interactions because I didn’t want to have to either out myself as a smelly, disgusting smoker or else deprive myself for hours or more at a stretch. And the price has steadily gone up.

I did try vaping for a time and it was likely a better alternative than cigarettes. But the best, speaking from personal experience, is not having any dependency on nicotine at all. The psychological effects were so devastating for me. And as the article says, so many people die or have died of smoking related diseases. And it is a slow, drawn out process. It is an incredible shame and I am very happy that it is affecting a smaller portion of people than ever.

comment 3y ago · link · parent

i dunno. that's a little steep. i'd go as high as $2.49

comment 3y ago · link · parent

That was very clear and very well written. I got a hell of a lot out of it. I made sure not to scan in this instance.

To me it was all about understanding the limitations, motivations, understandings, and abilities of our users or audience, and giving them a chance to get what they need with a minimum of fuss (thereby making our site/tool/whatever of maximum utility).

I want to say I’ll read the book now, but I’m not sure if that is true. (I a deliberately eliding a joke about my own satisficety for the sake of you, dear reader. :) ) I will bookmark this page and I expect that I will come back to it. In particular I liked the practical and useful plan for performing tests.

comment 3y ago · link · parent

FWIW, I’ve taken some concrete lessons away from this post and the ensuing discussion.

comment 3y ago · link · parent

Interesting idea. I am not sure that such is available in Go. In Go, with slices, once the backing array has been allocated, I don’t think you can deallocate some at the end of it. But I might be wrong.

There is a difference in Go’s slices between length and capacity. Length is the number of elements in the slice, and capacity is the number of elements that can fit in the backing array (so len <= cap).

comment 3y ago · link · parent

I’ve never actually seen a length passed to make() when creating a map - does it work?

Edit: yep - https://go.dev/ref/spec#Making_slices_maps_and_channels

comment 3y ago · link · parent

I am curious how much of a difference there would be if the author would use

  result := make([]unit64, 0, len(elements))
in the old func. I think that the way it is written, it will continually have to be expanded as the backing array exceeds its capacity (in the course of append() calls).

And as others have pointed out, maybe use an empty struct (as opposed to a bool or empty interface) as the map value type. Also TIL about make(map[T]S, len) - didn’t know you could set len, or at least hadn’t seen it in practice, but it was suggested here and I think it would likely help as well.

Edited: I forgot to set len to 0.

comment 3y ago · link · parent

s/that said/having said that/

https://www.youtube.com/watch?v=O5DCns_n9_M

comment 3y ago · link · parent

That was implicitly intended to be part of menu template code, so it would show the “Mixed Fruit” option only if it wasn’t prod, and as I tried to suggest in my comment, such code would not execute on prod (the endpoint/backend code would abort if it found itself running in prod). (And the mixed fruit code would, in fact, affect data in the DB). Tbh I think this discussion is less than pointless.

comment 3y ago · link · parent

:)

Fair enough...

comment 3y ago · link · parent

It's hard for me to say whether you are correct or not; I was under the impression that the data was updated on the DB instance, and in that case I stand by what I said (the prod data would end up on the laptop, but then as soon as the command was run, it would get permanently obfuscated). If the data was just obfuscated on screen, then yes, perhaps you are correct.

Something I have seen done before that I thought was good was that every so often a production database was synced, but during the sync process, things that could identify a customer were redacted or obfuscated. Then almost anyone who had need to work with production data would use the munged version.

comment 3y ago · link · parent

I believe that your assessment of startups is valid. I also think your views are true of big, multinationals as well. It seems that by the time a company gets large enough, consumers start receiving some protections, but workers, not so much.

- https://en.wikipedia.org/wiki/Foxconn#Controversies

- https://en.wikipedia.org/wiki/Hyundai_Motor_Manufacturing_Al...

etc.

comment 3y ago · link · parent

good ethics, bad data handling practices.

  <?php
  if (! $isProd) {
    showMixedFruit();
  }
Also, the code should not be allowed to run on a prod instance, even if it is triggered there.

But, I'm sure you've figured this all out by now.

comment 3y ago · link · parent

> This entire article was written for one group of people.

>

> If you are employed at MariaDB, you absolutely need to be scheduling interviews with other companies.

comment 3y ago · link · parent

https://www.postgresql.org/docs/current/using-explain.html

comment 3y ago · link · parent

Never heard of this person before but was pleasantly surprised by the content.

In my own life, I have spent decades plagued by the feeling that I wasn’t doing enough, and I had many varied areas of focus and felt like I didn’t really progress on anything. That in itself (the feeling of lack of progress) was I think kind of misleading, as I did progress on some things (though I clearly regressed on some things as well).

I don’t really know how it happened but I have made some significant shifts in my life. I started to become physically active again, I stopped smoking cigarettes and some other unhealthy habits, I started really developing and digging into some of my active and creative passions like writing, playing a musical instrument, and renewing my focus on coding to an end and with purpose and quality in mind.

Somehow I started finding that I had much more energy and time available for everything. And as opportunities arose I began to seize them. It was a very exciting period for me. Eventually, my plate really became too full, and things began to suffer (mostly me) and I started to say no to things, and continue to keep my focus on what I really think is important. I feel that it has taught me about the interconnected nature of my life, and about how to value my time, how to slow down and appreciate something, how to deal with my emotions head on instead of taking years or decades to process events in my life (I am sure there have and will be many exceptions to what I have said), how to actively take stock of my current situation and change my plans as needed, how to deal with the fact that my expectations for things very rarely match up with reality, how to stop being an intellectual purist and idealist while still deeply valuing a good idea and pursuing my ideals. I look back at how much I have accomplished the last year and I can’t help thinking everything came from stopping trying to do everything and accomplishing nothing (or so it felt), and by embracing what really mattered to me when it was in front of me. I learned to float down the river, I guess. Lazily most of the time. But when I feel it is necessary, I can exert more power in changing my trajectory than ever I could before.

comment 3y ago · link · parent

i really enjoyed this post.

i have been pretty reluctant to take photographs in general. i do enjoy a nice photo for sure, and i have taken a few that i actually like too.

> [I]f you have a camera on you, that's good enough, and you have the basic understanding of photography, you can capture an event that would otherwise be lost to time.

i like this thought. and i will perhaps try to take more photos.

comment 3y ago · link · parent

That was very entertaining. Thanks for posting.

comment 3y ago · link · parent

Interesting post. I have bookmarked it. I’m probably going to check out the software gore one for a few mins just to make myself feel sick.

Unrelated, but despite not programming in C or C++ in several years, I have always enjoyed reading PVS Studio blog posts as I come across them. It is fun to think about static/dynamic analysis (I actually am not sure where the line is) and language design.

comment 3y ago · link · parent

I can't say that I'm a fan of this current crop of LLM chatbots.

Some things bother me about this article and the facts that warranted it in the first place. I have very similar reservations with regard to the Bing chatbot launch (detailed below - just substitute Bing for Bard).

> Google has a lot riding on this launch. Microsoft partnered with OpenAI to make an aggressive play for Google’s top spot in search. Meanwhile, Google blundered straight out of the gate when it first tried to respond. In a teaser clip for Bard that the company put out in February, the chatbot was shown making a factual error. Google’s value fell by $100 billion overnight.

1. LaMDA is not a new project. They are clearly releasing a chatbot based on it to the public to compete with MS/OpenAI. But if the tech existed some time ago (and as a developer I realize that iteration and time and attention tends to improve quality), why didn't they release it before? I am guessing - baselessly - that they saw that the quality of the output was quite poor (often factually wrong, for instance). But now that a competitor is threatening their market share, quality metrics goes out the window - revenue is once again king.

2. Funny how the valuation of the company dropped so quickly. It is because as shareholders we rely so much on short term gain. There is no focus on follow-through or long-term consequences. I certainly don't believe that capitalism is inherently bad and I am a huge fan of competition. But I think the way we practice it leaves many practical things to be desired.

> “We’ll get user feedback, and we will ramp it up over time based on that feedback,” says Google’s vice president of research, Zoubin Ghahramani. “We are mindful of all the things that can go wrong with large language models.”

>

> But Margaret Mitchell, chief ethics scientist at AI startup Hugging Face and former co-lead of Google’s AI ethics team, is skeptical of this framing. Google has been working on LaMDA for years, she says, and she thinks pitching Bard as an experiment “is a PR trick that larger companies use to reach millions of customers while also removing themselves from accountability if anything goes wrong.”

3. This quote, and the mention in the article of the "Google It" button below the Bard chat, the three versions of Bard's response ("drafts", FTA), the quote by the Google product director that says "There’s the sense of authoritativeness when you only see one example”... I could not agree more with what Margaret Mitchell has to say (I have never heard of her before, to my knowledge). Isn't it very clear by now that users don't have the time or attention to acknowledge implications? We are busy and we don't have the energy. If we see it on a screen, we take it as fact, copy and paste it as needed, and proceed with the knowledge that we have gleaned from said "facts". I suspect that if anybody really knows how misinformation works and the effects it has on society, it's data analysts at Google search. But the almighty revenue stream dictates that they push this not-necessarily-factual-information-producing-tool anyway.

If I can find the time, I'm quite curious to read that article that just pre-dates Bing chat and Bard about the dangers of using LLMs in search engines.

1
678
16