HN user

grantcox

192 karma
Posts1
Comments25
View on HN

I agree, the rhythm of the rhyming feels great - tight and (dare I say it) artistic.

@franze is that something you have control over - is the prompting so detailed / accurate that you can specify that? Or is there some other tool that can adjust an initial revision? Or is it simply a roll of the dice?

My assumption is that the distorted image (https://cms-cdn.lux.camera/wp-content/uploads/2021/05/261601...) is actually a corner-crop of a 120 degree wide-angle photo. For example if you took the corner of https://cms-cdn.lux.camera/wp-content/uploads/2021/05/261800...

Do you know if my assumption is incorrect?

If that's the case, what can be done about reducing that distortion? My layman's understanding is that it's like mercator projection - you simply cannot make a two-dimensional photo of a wide field of view without distorting.

I have a M1 Mini with 16GB memory. The machine's SSD is incredibly fast, so it swaps very well.

Whereas my 2019 MBP will suffer incredibly when I start running out of memory (it literally becomes unusable and requires a hard reboot), the M1 will transparently start swapping, and I generally don't even notice.

Just the other day I noticed a python process was running slower than expected, and it was a bug in my Pandas code so I had allocated 85GB of memory. The rest of the system was operating normally - Chrome, VSCode, Music were all fine.

I regularly kick off a data pipeline process with 8x concurrency, even though each process uses between 4-6GB memory. It's probably inefficient in some way, but overall is still much faster than running at 2x concurrency (where everything would fit in memory and it wouldn't need to swap).

My M1 Mac Mini is also at 3% after 2 months, 1 TB disk:

  Percentage Used:                    3%
  Data Units Read:                    168,154,606 [86.0 TB]
  Data Units Written:                 169,999,872 [87.0 TB]
  Host Read Commands:                 1,077,848,202
  Host Write Commands:                743,848,335
this is a secondary dev machine, so while it's been on and idle for almost 500 hours, it's only had a week or two of "active work".

I've worked for my company for 7 years now, and I "get paid well for it". The actual $ figure isn't important, other than "it's enough for me". I'm sure it's less than the average software developer with my experience, and certainly it's less than the incredible figures that the big SV companies apparently pay.

But I love working here, the company mission is very inspiring, and my coworkers are excellent. And my salary is enough that my needs are met. So I'm really not interested in keeping score.

Thanks for sharing this, I've not been (and never will be) a SV employee, so it's interesting to see such a different perspective.

The big question that I didn't quite get from the post, is why did promotion matter so much to you? Everything seemed to hinge on that, but you didn't quite explain why it was so important, other than "what a great title - people would be so impressed". It sounds like when you were happy with your title, you were happy with your work - you "lovingly" fixed the old pipeline, wrote documentation, helped colleagues etc. Were there particular benefits to being promoted that would have increased your daily happiness?

SQL Injection Wiki 9 years ago

The only successful SQL injection attack I've encountered in the wild was interesting, because the injection point had no visible output. But by injecting timing calls (eg "SLEEP()") and appropriate conditionals, the attacker was able to extract a few bits of information each request. Their script executed some tens of thousands of requests, and they managed to extract all the table names, and start to extract data from our "users" table.

In retrospect such an attack is obvious, and presumably tools like metasploit make them trivial to execute. But previously I'd had the idea that SQL injection was usually "literal raw data output".

@davycro just said "it’s a tough skill to learn without a solid background in anatomy". If you have your home ultrasound and cannot accurately locate / track your baby, you may identify the wrong thing, and worry "it's not moving!"

Our first child came very late, and in those last weeks we downloaded a "baby heart monitor" on our iphone - it simply used the microphone with some isolation / amplification. We pressed the microphone end of the phone into the abdomen wall, and when it works we heard an amplified heartbeat out the speakers - very reassuring. But when it didn't work - when we couldn't find the heartbeat - we worried. Is it a false negative? Or should we rush to the hospital?

Every one of those icons is a human life lost to a terrorist attack. This is both a tragedy without compare to family and neighbourhood, and one of the most appalling events in our modern world (people being murdered indiscriminately to further political aims).

Trying to convey that weight is entirely the point of the infographic.

I've recently started using Windows again on a gaming computer. Here are the problems I found, that felt "ugh, Windows":

- I'm now used to the "inverse mouse scrolling". To enable this for my mouse (logitech something?) I needed to edit the registry. Every time I plug it into a new USB port it's now a new device with a new registry entry to hack.

- I installed the various device drivers that came with my hardware. The Realtek on-motherboard network card had some driver, which actually stopped the hardware from working - Microsoft's own standard driver was better. But every time I rebooted, Windows would helpfully install the "updated" driver from it's local cache. I ended up fixing this by setting the permissions on some c:\windows\system32 file to such that the system itself could not update it

I'm also not yet familiar with the changes to the Start menu and Windows Explorer, so those also feel confusing. But it's a gaming computer, I turn it on, play games, then turn it off. Presumably if it was a development workstation I'd have more opinions on the rest of it.

This was very helpful for me, thank you.

I couldn't get Karabiner to work - it seemed to install correctly, but none of the "prepared settings" did anything. No matter what options I'd chosen, my keyboard (both laptop keyboard and external) were unaffected.

Reading over your guide I decided to just try your "swap space and tab" example in the private.xml file, and lo-and-behold, that worked. As does recreating the inbuilt "play/pause, mute and volume to F9-F12" in private.xml, whereas the inbuilt version doesn't work for me.

Penny Auctions 10 years ago

If one bidder spent more than $3500 in bids for that tablet, it's either a shill account or a credit card scammer. Neither one is particularly surprising with sites like this.

Phnom Penh, Cambodia. My wife's work requires her to work abroad, and this is the post that made sense for our family and her career. It's a nice enough place to live and work, very cheap, all modern conveniences are available, great expat community. We'll stay for a couple more years, then move somewhere else (she gets re-posted every 2-3 years).

"Mental illness" and "psychological problems" both have such unfair negative connotations. But yes, if someone is finding the pressure of an activity graph and "breaking a streak" is negatively impacting their work-life balance, I think they likely have a problem.

These problems are quite common, hence the great success of free-to-play, extremely-gamified mobile apps. In many of those cases exploiting the most vulnerable users is the entire point, but not so for Github. So for Github to consider how they can maintain the interesting / fun / motivating (or irrelevant) aspect for most of their users, but temper the positive/negative reinforcements that some people may find literally addictive, it seems quite responsible.

I agree that it's a largely irrelevant / frivolous feature, and if someone cares deeply about it, it's likely a sign of some deeper psychological issue.

But deeper psychological issues are real, and gamification definitely pushes a certain agenda. When that agenda (in this case "streaks" and "commits per day") isn't really serving a community, it would be sensible for the community to tweak those rules. Putting some upper bound on them (for example, no "penalty" for missing days here and there, or stopping counting at some point) makes no difference to people "who don't care about it", but may make a positive difference to those people who care too much about it.

The early announcement allows our sysadmins to plan to work during those hours, and for the rest of our org to know that we'll have rolling infrastructure downtime, and that isn't the best time to plan a new feature launch etc.

You may need to externalize the responsibility, to have someone else "make" the decision.

For myself I've found someone who is above me in our org, even though they aren't particularly technical. I can take them these problems, they'll hear me explain why I think X is a good direction, or why it's better than Y (even though I'm uncertain of the outcome). They will ask sensible questions (costs, risks etc) and approve the direction, eg "then I want you to pursue option X, and come back to me when you hit unexpected circumstances".

This person can be anyone that you feel some ultimate responsibility towards - in a one-person startup perhaps it's your significant other, as you owe it to them to be efficient and effective (and not wasting time procrastinating).

Ten Days of Silence 11 years ago

I recommend learning how to meditate before you go. I attempted a 10 day vipasana as a complete beginner and with insufficient research, and assumed it would be some kind of "course". Instead we were instructed on what to meditate on (first day is literally "feel the breath entering your nose"), and then expected to sit still and meditate for 11 hours a day. This vipasana (Kathmandu, late 2011) had no "optional sessions", and no additional instructions. As a complete beginner I was disappointed and frustrated - was I doing it right, is there no technique to be taught, or tips to be given?

The analogy I'd give is if I'd joined a 10 day fitness camp and the only instruction was "do deadlifts", and then you were left alone for 11 hours. What's a deadlift? Is this the right form? After an hour I feel like I've exhausted these muscles, do I really just keep doing it for ten more hours today?

After three days of this, (each day having a slightly more specific focus but still lacking in the kind of direction or confirmation I was looking for), I left. I was a stone's throw from the Himalayas, and I felt that spending my remaining time in the mountains would do more for me than sitting in a dark room feeling confused and frustrated.

I can't answer how to learn to meditate, I haven't followed it up (once burnt, twice shy). But you could try the vipasana way at home - sit in a quiet room and "feel the breath entering your nose" for an hour.

I guess I just don't see why Newbee is so much better than existing baby trackers, that I want to invest in seeing it made. Yes the UI looks nice, but the actual features don't seem any better than the dozens of trackers that are already on app stores.

If this was an existing product on the app store, and was also just a few dollars, I may have bought Newbee because it looks prettier. But $16 for a chance to use a 1 year subscription (if it's ever made, and I have another child around the same time), of a product that doesn't seem to have any advantage other than "prettier"... I'll pass.

I assume you mean the example towards the bottom of http://docs.sqlalchemy.org/en/rel_0_9/orm/session.html#when-...

So where do you use this "with session_scope() as session:" context wrapper? Do you wrap your entry point in it, so the entire app is implicitly using the session (as the example shows)? Or do you call it in each separate function that needs data access?

If the former, how do you handle commit() and rollback() for "local" (per-function) changes? It sounds like either "never rollback" or "always commit" is necessary. And I think "always commit" is more likely, because usually an entire "request" (whether we're talking web apps or not) isn't atomic.

So you've got this SQLAlchemy session context wrapper around the entry point, nice and separated from all the internal data functions. Except every data function actually needs that session to commit(), so it's either pulled from some global state, or passed around like a stinky baby.

But this can't be the case, as this inelegance is not pythonic, and SQLAlchemy is the Python ORM. What am I missing?

I'm fairly new to Python (~6 months) and started with SQLAlchemy, but recently switched our app to Peewee (http://peewee.readthedocs.org) because of frustrations with the SQLAlchemy "session".

The standard method of scoped_session(sessionmaker(engine)) will return a thread-local session - so all data manipulation effectively shares a global session.

- Every change needs to be followed with a commit() or rollback(), or you'll end up with rubbish in the session that some later call will inadvertantly commit.

- If you want to do a general "update where" call, make sure you use "synchronize_session=False" and then session.expire_all(), otherwise the session will be out of date.

It felt like every time I had code working with data, I also had a non-trivial amount of session management. It wasn't abstracting the database access away, it was making everything very SQLAlchemy session specific.

To be honest I'm somewhat second guessing my decision, because Peewee is far from the Python standard. But it's simple, understandable and clear, and doesn't force a strange "don't forget to manage the global state" mindset onto everything.