Better HN
topnewbestaskshowjobs
Log inSign up

shortrounddev2

2,427 karma · joined Jun 15, 2023 (3y ago) · 1,641 submissions

Submissions

comment 3y ago · link · parent

You still have to pay for the reservation, even if a human did it

comment 3y ago · link · parent

> be kind to the server and only download the file if it's updated

I wonder if their webserver supports the If-modified-since http header

comment 3y ago · link · parent

Crazy how similar the commands are.

comment 3y ago · link · parent

You should checkout powershell; it supports converting CSV into in-memory structured data and then you can run regular powershell queries on that data:

    $> csvData = @"
       Name,Department,Salary
       John Doe,IT,60000
       Jane Smith,Finance,75000
       Alice Johnson,HR,65000
       Bob Anderson,IT,71000
       "@;
    
    $> csvData
         | ConvertFrom-Csv
         | Select Name, Salary
         | Sort Salary -Descending
    
       Name          Salary
       ----          ------
       Jane Smith    75000
       Bob Anderson  71000
       Alice Johnson 65000
       John Doe      60000
You can also then convert the results back into CSV by piping into ConvertTo-Csv

    $> csvData
         | ConvertFrom-Csv
         | Select Name, Salary
         | Sort Salary -Descending
         | ConvertTo-Csv
         
       "Name","Salary"
       "Jane Smith","75000"
       "Bob Anderson","71000"
       "Alice Johnson","65000"
       "John Doe","60000"

comment 3y ago · link · parent

The site apparently serves .csv directly as well (replace .zip with .csv). I used this to convert the expression to powershell (using only built-in powershell cmdlets and commands):

    $> (invoke-webrequest "https://www.ecb.europa.eu/stats/eurofxref/eurofxref-hist.csv").Content
         | ConvertFrom-Csv
         | sort "usd"
         | select "date" -first 1

       Date
       ----
       2000-10-26
Doing it with a zip file would be a little more verbose since there is no built in "gunzip" type command which operates on streams, but you can write one which does basically that out of built in .Net functions:

    function ConvertFrom-Zip {
        param(
            [Parameter(Position=0, Mandatory=$true, ValueFromPipeline=$true)]
            [byte[]]$Data
        )
        
        process {
            $memoryStream = [System.IO.MemoryStream]::new($Data)
            $zipArchive = [System.IO.Compression.ZipArchive]::new($memoryStream)
        
            $outputStreams = @()
            
            foreach ($entry in $zipArchive.Entries) {
                $reader = [System.IO.StreamReader]::new($entry.Open())
                $outputStreams += $reader.ReadToEnd()
                $reader.Close()
            }

            $zipArchive.Dispose()
            $memoryStream.Dispose()

            return $outputStreams
        }
    }
and call it like:

    # unary "," operator required to have powershell
    # pipe the byte[] as a single argument rather
    # than piping each byte individually to 
    # ConvertFrom-Zip

    $> ,(invoke-webrequest "https://www.ecb.europa.eu/stats/eurofxref/eurofxref-hist.zip").Content
         | ConvertFrom-Zip
         | ConvertFrom-Csv
         | sort "usd"
         | select "date" -first 1

       Date
       ----
       2000-10-26
I love powershell

comment 3y ago · link · parent

>That's fairly decent

Meanwhile, Microsoft released a security update to Windows XP in 2019

comment 3y ago · link · parent

Personally I believe that a touch screen mobile device is a degraded experience for any UX. This is just the cheapest way to manufacture a device so it's what has won out. But I hate the lack of tactile feedback and avoid using my phone for anything I can

comment 3y ago · link · parent

I just have my home pc set up as a media server and I share my videos folder across the network. I have a roku with a basic file browsing app that let's me see the files and I just use that. Never quite understood why an entire server and app was required for something that has been supported natively by any OS for years

comment 3y ago · link · parent

> Abortion or guns aren't 'hot button issues'. They're at their core about self determination and Americans deeply and ideologically disagree on them. Firearm politics is as old as the nation, in a sense even older. They can't be done away with by just making some process better, as if factions and divisions are just some sort of hallucination caused by wrong mechanisms.

I truly believe that most people wouldn't give a shit about either of these issues if they weren't being told to give a shit about these issues. These issues are signals for political tribes and most people are far less ideological than they think they are. The monkey parts of their brains are being manipulated for reasons as arbitrary as the religious wars of the 16th century.

comment 3y ago · link · parent

I mean that the comparison is incorrect. Irrelevant was the wrong word. There's no similarity between any of the 3

comment 3y ago · link · parent

I can see why she's the former press secretary. To communicate what the point of the party is, you need to actually understand it, which she doesn't seem to

> Despite the steady drumbeat of this mantra, there wasn’t much internal understanding of what it meant, let alone a strategy of how we were going to accomplish it.

The headline for Forward right now is: get ranked choice voting and open primary ballots passed in as many states as possible using ballot initiatives in the states that have them. That is the main thing they focus on. If she, the press secretary, didn't know that, then perhaps the organization has a communication problem, but that's not a lack of a platform. Forward doesn't take positions on the current hot topic political issues like guns or abortion because they don't believe we can legitimately solve or come to a consensus on these problems with the incentives which exist in our current political system. Therefore, the strategy is to unite people from the left and right to create a new set of rules we can agree on, and then use those rules to solve our disagreements.

Her references to tech companies is a familiar, but irrelevant criticism of Andrew Yang: to label him a clueless tech bro and equate him, somehow, with the financial fraud of con artist Elizabeth Holmes or the market failure of WeWork (two companies which are completely unlike each other) is a common refrain of his detractors (usually, though, these criticisms come from the DNC, not the Republicans). They want to label him as another product of San Francisco tech culture trying to solve complex political problems with engineering-inspired solutions. This is not what Forward is about

> While the party supports electoral reforms such as ranked choice voting, independent redistricting commissions and open primaries, it is agnostic when it comes to having policy stances, believing it is better to not take a stand on voting issues than plant a flag and alienate people.

>That’s right — no platform laying out party principles and positions, no policies, no plan. Only showmanship.

I don't know how she can define the most important policies of the party in one sentence, and in the very next breath claim that it has no policy positions just because their party isn't about getting screaming matches over abortion or transgender athletes.

comment 3y ago · link · parent

No, their strategy is to focus on reform from the bottom up: getting local officials elected at the city, county, and state levels in order to pass electoral reform (states control election in the US) to make our national politics less inflammatory. Parties matter less at these levels. Their main goal right now is to get ranked choice voting passed in as many states as possible (focusing their energy on ballot initiatives). They are also not a "party" (they are registered as a PAC). This way, republicans or democrats can receive a foward party nomination without having to leave their own parties and run independent. They just have to be aligned with forward party goals. They have maybe 1 or 2 US representatives that they're tracking, but Andrew Yang is not running for president in 2024 because it would just be a waste of money to them. The vast majority of their advocacy is at the state and city level

comment 3y ago · link · parent

The forward party is about electoral reform, not just civility. Civility is their message, but their policy platforms are about reforming elections to try to disincentivize radical politics inside the parties

comment 3y ago · link · parent

Targeted advertising is a way to sell unused inventory on smaller sites. Large sites can still afford to do direct-deal ads, showing huge banners on the top of cnn.com because they have a diverse enough set of users that the advertiser doesn't particularly care who sees it. Smaller sites need targeted ads because the margins are incredibly thin without them. Smaller sites also don't have dedicated ad buying teams, and so they use the open ad exchanges to fill unsold inventory at an auction. Without ad targeting, the prices at auctions would be much smaller. Like it or not, targeted ads and the open source exchange ecosystem is what keeps smaller publishers from getting swallowed up by the big boys

Targeted advertising has existed in some way since we invented advertising. Knowing that certain people (e.g: rich vs poor) are more likely to live near a certain billboard informs you whether or not you should buy a billboard there. Nielsen has been collecting data on TV watchers since the 1950s and that informed the TV networks which timeslots and on what channels they should advertise on, and what they should pay.

We need to have laws on how we target advertising. Reddit, for example, allows you to target ads to specific subreddits, rather than users. Most people are fine with this idea, since it doesn't require reddit to know anything about the user, just about what page is the user on. This kind of targeted advertising is the most common, as sites will share information with ad exchanges on the type of content which is available on their site (rather than having to track the user themself).

comment 3y ago · link · parent

My company doesn't officially measure metrics for developers. One thing my boss keeps track of is how many tickets get moved from one sprint to another, but not per-person, just as a team.

Quantifying human labor (especially knowledge work) is extremely difficult, and I think you need to just have an organic, on-the-ground view of it. Project managers that know how to code and what kind of work goes into a problem can better understand the level of effort for a particular problem, then you can see who is pulling their weight and who isn't.

comment 3y ago · link · parent

I believe no. Maybe for some math classes the practice is important, but then we need to ask what we're really trying to get kids to do here.

One problem with how we measure this is that we use test scores as our metric and target. We ask "does homework improve test scores, which we implicitly accept as the definitive metric for learning" rather than "does homework improve learning".

Closed note, closed book, timed, silent tests are not a thing that occurs anywhere outside of academic environments. In real life, you are expected to use resources to solve problems. Homework may really only help with test scores (if it does that at all) since it helps with rote memorization. In order to pass a calculus test, you are expected to do 100 calculus problems and try to pattern-match the integral on the test to the handful of integration algorithms you were drilled on, then manipulate the symbols to get the desired result. However, if most people were asked to use calculus in solving a problem or modeling something, they'd be utterly lost because calculus classes and tests take no time to explain the utility of a tool which was created to solve problems and model things.

comment 3y ago · link · parent

> even if you spend years arguing it doesn't necessarily lead to the democratic results you want

Yes, this is how democracy works in general. You don't get everything (or necessarily anything) you want

Personally the only thing that would really make me quit is if they tried to make me go hybrid or back to the office in any way. My workplace is small (10 engineers) and so unionizing based on that could be pretty easy, but it would be easier for me to quit and find a new job that does do remote

comment 3y ago · link · parent

We licensed Maxmind's DB recently (it's like $300 a year or something). idk if there are US-only databases. Our customers are all in the US, and we use geo IP to filter european users for compliance (GDPR and otherwise)

comment 3y ago · link · parent

In most states in the US you are not required to join the union if your workplace votes for it

comment 3y ago · link · parent

I work in adtech and this is how we do geolocation. There's also device geolocation but if the user doesn't consent to sharing their GPS data with us, we just use IP address for targeting. Common provider for this is Maxmind; they ship a database that you host locally and query

comment 3y ago · link · parent

Big tech might, but unlike steelworking or auto manufacturing, the barrier for entry for tech is very low, and so big tech aren't the only employers out there. They're not even the only employers paying high wages (you can get good salaries at startups as well)

comment 3y ago · link · parent

Jobs aren't all technical skills. You can be the best coder in the world but if you're a colossal asshole you're not going to get put in charge of other people. If you show up to work drunk or high, you're definitely not going to advance.

comment 3y ago · link · parent

Unions are democratic organizations. If those things are important to you, you can speak up at a union meeting

comment 3y ago · link · parent

Would be cool to see them make their own engine, though. I'm always happy to see new game engine projects

comment 3y ago · link · parent

Most likely moving to Unreal

comment 3y ago · link · parent

> We had 10 years to make our own engine and never did. I'm sure a lot of game companies are feeling the same today.

I think Facepunch is one of the indie studios uniquely poised to do this. Garry spent years working on modding the source engine, adding features to the point where it's like a new engine on top of the source renderer

comment 3y ago · link · parent

If the CIA helped labor unions, they didn't cause the problem. Bad socialist economics did, and the US exacerbated the political crisis. Allende would've crashed and burned (deservedly) without US intervention. I'm not sure I see the merit in the argument that the US broke the leftist Chilean economy by supporting the workers ability to strike... if anything that aligns us closer with the left than Allende.

comment 3y ago · link · parent

My point is that the historical path was not imposed on them. People of south America are not blind children incapable of making decisions for themselves. Allende was a bad politician who ran his country into the ground and discovered the consequences of that

comment 3y ago · link · parent

I think the historical consensus now is that the amount of work the US put into destabilizing Allende is overstated. Allende was unpopular due to mismanaging the Chilean economy without any help from the US. From what I understand, the US was actually surprised to learn that Pinochet had overthrown Allende because they considered it too early to do so. I believe, at most, the US had paid for campaign/propaganda material against Allende.

Pinochet goes into a bucket of other dictators like himself, such as Park Chung Hee and Lee Kwon Yu, who ruthlessly cracked down on political opposition (particularly leftists), but who modernized their respective economies and (in the case of Pinochet) brought them back from the brink of utter economic collapse. These figures remain controversial in their home countries because they were a double-edged sword: the economic advancement which benefitted everyone was paid for with blood

Today, the US Left remembers this as beginning a period of neoliberalism (Chicago school economics) in much of the developing world which had just begun to set its ambitions much higher than they could reasonably afford. They consider this to be a bad thing because they didn't live through the period of the 1970s in which expanded fiscal and irresponsible monetary policy allowed inflation to rise and governments to explode their debt/gdp ratio, with disastrous results

comment 3y ago · link · parent

Mentoring is as important as the technical output. You cannot be a senior engineer without being able to mentor
1
404142
55