bluejellybean

Joined 13 years ago

Karma
619
Submissions
226
Member since
Oct 30
https://alexbarkell.com @alexbarkell on Twitter alexbarkell @ the google mails American programmer Press on
View on Hacker News

Recent submissions

Comment · 2 months ago
Beats it for sure, humans are by far the most complex machines, a true marvel of the world. By comparisons, humans make phones look like simple toys.
Comment · 2 months ago
This feels like the weirdest complaint to me. Just tell it to shorten its response.

Literally saying "one sentence response" solves most of this problem.

Comment · 3 months ago
I'm in a similar camp, I dislike how often third-party package updates get pushed out, especially given the lack of serious inspection.

The reality is that each update is its own potential security issue and with supply chain attacks being all too frequent, it's not a panacea.

Comment · 5 months ago
Road to hell is paved with a lot of 'shoulds' reality is a very different place filled with piles of trash and half baked ideas.
Comment · 7 months ago
Yep, the 'unit' is size in which one chooses to use. The exact same thing happens when trying to discuss micro services v monolith.

Really it all comes down to agreeing to what terms mean within the context of a conversation. Unit, functional, and end-to-end are all weasel words, unless defined concretely, and should raise an eyebrow when someone uses them.

Comment · 8 months ago
I have a very small utility library that receives a few downloads every couple of weeks that I just spent a few hours upgrading today.

It solved a problem I had, but it's a very small problem that few people share and the efforts spent selling it would be a poor use of my time given how niche it is. The few extra minutes to hit npm publish is worth the couple hits of dopamine I receive whenever it's downloaded.

It's just nice to know I saved someone an hour or so of their life. No need to reinvent this wheel.

Comment · 8 months ago
How does one know what they want until they see it or imagine it?

When you can't imagine, you're stuck with searching, searching that comes in many forms, such as scanning catalogs, walking aisles, or letting someone else do it altogether.

If you can imagine what you want and describe it with sufficient language, you can have someone else (or something) go and fetch it for you, but you're still stuck with the problem of not getting _exactly_ what you want, so again, you must parse the results... or get stuck with whatever is returned first.

Ad the end of the day, it's a question of how much you care about getting the thing you want vs getting something that is close enough, and the answer is in how much effort you, personally, want to spend.

Comment · 8 months ago
Yet, here you are ;)
Comment · 1 year ago
Comment · 2 years ago
> Medium used to have an aura of carrying more reputational weight than a personal blog did.

At least within the realm of technical discussion, I'll be continuing to view it as a mostly negative signal. The institution is very rarely the individual, and there isn't value in assigning positive weight when said institution doesn't carry any itself.

Increased friction is counter-intuitively a positive here, it shows that the author has at least put some real investment into the presentation of their work. Don't get me wrong, doesn't need to be a fully self-designed/built website, just spending some cash on a domain && Wix template is at least _something_ more than throwing words at a page to profit.

Comment · 2 years ago
> No pilot has ever inspected let alone installed a door plug.

Guess we run in different circles!

Comment · 2 years ago
woah woah woah, let's be careful about these cowboys now - We NEED that bureaucracy in place for reasons!
Comment · 3 years ago
I did just this a few days ago, it's incredible how many people will come up and ask to pet your dog. Some will keep moving quickly, others will talk about their own animals, and some will drop little hints about themselves to further a conversation. Aside from everything fun about a companion, it's really is a fantastic feeling to be able to see someones eyes light up, you're brightening up their day!
Comment · 3 years ago
Yupp, it can! I've been able to get it to do simple examples. I was able to get it to print out a 'sum of digits' style function. I was then purposefully placed a silly bug in it by hand. I then ran the code through a 'please code review' style prompt, got a number of decent suggestions out. Using those suggestions, I was able to prompt it to refactor the function to: fix the bug, add documentation comments, include type definitions, and even add tests!.

A simple example, and not 'perfect', but it's quite impressive. Even a simple case of throwing your code 'over the wall' to the AI for review before going to an actual person is a huge time-saver.

The token size limit is the killer here, it means larger files, let alone projects, can't be fully processed in a single prompt.

Initial code produced: ``` def sum_of_digits(n):

    if n == 0:

        return 0

    else:

        return n % 10 + sum_of_digits(n // 10)
```

I didn't save the exact code review, but essentially it was just a list of suggested code changes. The prompt was:

``` prompt = f'Python3. Act like you are a senior engineer writing a code review comment on the code. Write at least two specific changes to make, being sure to check for any errors first: {prompt}. Be as concise and correct as possible, and also be sure to write in a way that is easy to understand.

```

The resulting output code was:

``` import unittest

def sum_of_digits(n):

    if n < 0:  # Added base case check for negative numbers

        return None

    elif not isinstance(n, int):  # Check type of argument passed in

        raise TypeError("Input must be an integer")

    elif n == 0:

        return 0

    else:

        return n % 10 + sum_of_digits(n // 10)


# Unit tests using built-in test suite

class TestSumOfDigits(unittest.TestCase):

    def test_sum_of_digits_positive(self):

        self.assertEqual(sum_of_digits(123), 6)



    def test_sum_of_digits_negative(self):

        self.assertEqual(sum_of_digits(-123), None)


    def test_sum_of_digits_type(self):

        with self.assertRaises(TypeError):

            sum_of_digits('abc')
if __name__ == '__main__':

unittest.main() ```

Edit: trying to cleanup hn formatting for readability

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton