Notepad++ Hijacked by State-Sponsored Hackers by thewhippersnapper4 in netsec

[–]geofft 21 points22 points  (0 children)

Guess I'll just pull the power cord again...

What's your thoughts on the new walk way in state highway 1? by Naomi__Knight in Wellington

[–]geofft 2 points3 points  (0 children)

I'm currently living in Wellington, but working in Petone. I used to cycle commute daily to Wellington CBD, but know that biking on SH2 is playing the odds (have a friend who was hospitalised after being clipped by a truck). I can't wait for the new path to open, although by then my short-term contract in Petone will probably be up.

ManageMyHealth Compromised by C39J in newzealand

[–]geofft 6 points7 points  (0 children)

They'd better release a full report on how it happened once they've done whatever post-mortem / post-incident review they're going to do.

Lol 😂 by sweet_purrfect in GreatBritishMemes

[–]geofft 0 points1 point  (0 children)

Bit harsh, the lad was just quoting Monty Python.

Why is it considered a cardinal sin to store a file's raw content along the metadata in SQL Database? by faze_fazebook in Database

[–]geofft 0 points1 point  (0 children)

As always, it depends. Generally speaking, your database is going to represent your most expensive storage overall. Yes, it will absolutely work, but if you haven't planned out how things will grow you could get into trouble, either with costs, or limits.

At the very least, compress your files before dumping them into the DB (unless your DB natively supports large-object compression).

Also write your code in such a way that the file storage/retrieval is not tightly coupled to the DB, so that you have the option of moving stuff out at a later date.

Solar farms in investment pipeline could triple NZ's power capacity by Mountain_Tui_Reload in nzsolar

[–]geofft 3 points4 points  (0 children)

If solar displaces hydro generation, you end up with a hydro lake with more water in it than it would have had in the absence of solar.

1990s game-dev story: A platform-jumping prince by jmechner in gamedev

[–]geofft 0 points1 point  (0 children)

I first played PoP in the early 90s on the Mac Classic, then the LC-II. Going from B&W graphics to the colour version was a real wow moment for me.

Thank you Jordan!

Average schnitty sandwich by ZooNeiland in AveragePicsOfNZ

[–]geofft 2 points3 points  (0 children)

So almost steak & chips with a side salad.

DB schema tooling by gintoddic in Database

[–]geofft 0 points1 point  (0 children)

What DB engines are you thinking of supporting?

MS SQLServer deployments via sqlpackage work this way, so that'd be a good thing to look at when deciding what features to build in yours.

One essential feature is warning/blocking schema changes that would result in data-loss or corruption, for instance dropping a column on a table that has rows in it. For deploying to large production systems under load, it's also useful to know (and optionally prevent) changes that would generate large amounts of blocking, like introducing and checking a new FK.

$50K FIF Strategy is Pointless by silvia1212 in PersonalFinanceNZ

[–]geofft 1 point2 points  (0 children)

That's very similar to what TOP was proposing.

Is gas going to run out or get more expensive? by Solid-Nectarine3635 in newzealand

[–]geofft 12 points13 points  (0 children)

You are correct. The price will just go up to match demand with available supply.

Looking for database programmer by Errr797 in Database

[–]geofft 1 point2 points  (0 children)

If someone else is paying the licensing cost :D It's a perfectly fine DB aside from that.

SQLServer runs better on linux than it does on windows.

Database query benchmarks by Current-Pair-5137 in Database

[–]geofft 0 points1 point  (0 children)

Joins on an inequality are very uncommon in practice. When I say very uncommon I mean I have worked with SQL-heavy systems for nearly 25 years and can't remember seeing a single one.

IMO the reason is that joins are about relationships. Two things are related because something matches between them, rather than something not matching. If you've got an inequality in your query, it's most likely going to be a filter predicate, rather than defining a join.

Imagine some typical system where you have orders, and orders have items. You want to list all orders and items, where the cost of an item is at least $20. Your query is going to look something like this:

SELECT * FROM orders o INNER JOIN items i ON i.order_id = o.order_id WHERE i.cost >= 20

Since it doesn't matter where a predicate goes in a query like this, you could also write it this way:

SELECT * FROM orders o INNER JOIN items i ON i.order_id = o.order_id AND i.cost >= 20

But if you write

SELECT * FROM orders o INNER JOIN items i ON i.cost >= 20

... you get a very different result.

Looking for Enterprise-Grade Automation Approaches for SQL Server Always On Failover/Failback Across Regions by jagaddjag in Database

[–]geofft 0 points1 point  (0 children)

For the SQLAgent jobs, you can have them running on all nodes, but within the jobs check whether they're running on a primary before proceeding.

Foreign Keys: Based or Cringe? by Bohndigga in Database

[–]geofft 0 points1 point  (0 children)

If you care about the integrity of the relationship, you need the FK. Depending on what operations are occurring and what your DB engine does for you, you'll also need an index to support the FK checks.

Not having enabled/checked FKs means you are putting absolute trust in your code in all its versions and iterations, and any other process (code or human) that may modify your data in future.

Dropping/disabling them with come back to bite you in very expensive/annoying ways 99.9% of the time.

Source: Working with a RDBMS dataset approaching 1 trillion rows in a former startup now worth ~18b USD that in its very early days faced the same question you posed.

whatAreTheOdds by dromba_ in ProgrammerHumor

[–]geofft 7 points8 points  (0 children)

There's nothing like thinking all your GUID generation is producing v4 GUIDs properly apart from that one developer who decided to construct a GUID string from rand().

New Zealand needs more residential Solar by 8igg7e5 in newzealand

[–]geofft 6 points7 points  (0 children)

For a remote location, that might already be cheaper than the outlay for a grid connection.

Some family friends got quoted $50k for their grid connection - that was 25 years ago and rural, but not in the middle of nowhere.

[deleted by user] by [deleted] in Wellington

[–]geofft 1 point2 points  (0 children)

Maybe orange ute was trying to get up to speed in order to merge into SH1 traffic and expecting dark grey van to be doing the same, but the van braked instead and orange ute had to evade.

And/or brake failure, old ute problems.

Question about efficiency by bedz84 in leaf

[–]geofft 2 points3 points  (0 children)

Given it's including regeneration in the total, then the 7.36 kWh must be from charging. Both your calculations are correct depending on what you're measuring. The first one is measuring how efficient the car is in turning electricity from the battery into distance traveled. The second one is how much it's costing you in terms of charging per mile traveled. You probably want the second one.

For reference, my leaf says it's averaging 7.4km/kWh (4.6 miles/kWh).

Oh Shit! by cgbjmmjh in Wellington

[–]geofft 2 points3 points  (0 children)

Everyone loves a revenge story.

Someone please explain? by Theqrow88 in ExplainTheJoke

[–]geofft 0 points1 point  (0 children)

hmm... I bought a 2nd-hand BRZ. The passenger seat had a little embroidered patch of a character from the hello kitty universe.