Better HN
topnewbestaskshowjobs
Log inSign up

uk_programmer

144 karma · joined Feb 20, 2020 (6y ago) · 232 submissions

Submissions

comment 6y ago · link · parent

I thought I heard on the radio they shut the entire border. It seems they shut the border with China after doing a quick web search.

https://metro.co.uk/2020/01/30/russia-closes-2700-mile-borde...

comment 6y ago · link · parent

I don’t think Russia has ever claimed to have no homosexuals. I think you are confusing it with maybe Brunei.

comment 6y ago · link · parent

That not not really that relevant.

comment 6y ago · link · parent

Russia shutdown its borders pretty much straight away and IIRC they have hardly any cases.

comment 6y ago · link · parent

Cargo-culting can sometimes be okay. I normally have to work on large legacy code bases and sometimes it is simply better to try to copy something similar in the codebase in terms of functionality and try to follow the structure of what went before. Without documentation it is sometimes the only way to udnerstand the codebase. Especially when people have (ab)used reflection or dependency injection.

comment 6y ago · link · parent

> I'm not sure what you mean - what choice do you have?

I can choose not to interact with their platform at all. I can also find other ways of interacting with them in other ways (scraping or headless browser automation).

> Also this isn't much (if any?) of an API change, it's a policy change. And even then it doesn't look like it should negatively affect you unless you were doing something nefarious already.

If you are investing time and effort into an endeavour (whatever it is) it helps to know whether ground is likely to disappear from under you.

Microsoft while many people don't like them have kept many ancient APIs working e.g. We have code from 2005 that still works with the latest .NET Runtime with rather minimal changes. This provides you with confidence that going forward you won't face a lot of churn.

Policies while they aren't APIs are important in that they are both clear, applied fairly and don't change on a whim. A lot of people are sceptical that Twitter will do any of those based on previous behaviour.

comment 6y ago · link · parent

A List Apart was quite a nice resource back in the day. A lot of better writing about web standards back then is still relevant now. Keeping presentation separate from the structure of the document is a must and seems to be forgotten today. It also helps with you JavaScript if you keep everything nice and separate. I don't particularly like the Asian guru terminology but It was all the rage at the time and everyone thought it was cool for some reason.

> When a new medium borrows from an existing one, some of what it borrows makes sense, but much of the borrowing is thoughtless, “ritual,” and often constrains the new medium. Over time, the new medium develops its own conventions, throwing off existing conventions that don’t make sense.

This was quite apparent at the time IIRC. A lot of places at the time wanted a web page to almost like a printed page in a magazine and there was even a lot of magazine and newspaper style layout demos that you would find dotted about the web. Many of these designs are quite dated today because the designers were used to designing things for print rather than for web and never assumed that the content would change.

So the page looked great until you put some real content in it that was too long and then the nice layout wouldn't work.

I also remember Lorem Ipsum was used everywhere because it "flowed like real text". Except it really didn't and you quickly found that it was utter nonsense.

Lorem Ipsum would look like it took the space on the page quite nicely and things would look decent on the PSD. Once you put in English or God forbid a RTL language like Arabic it didn't work and everything again looked off and half arsed.

> But beneath questions like “how do I make my pages look the same on every platform” and “how can I make my fonts appear identical on the Macintosh and Windows” is an underlying question – “how do I control the user’s browser?” Indeed, the word control turns up with surprising frequency.

I remember in the mid 2000s (I only just left University). I thought it was the absolute height of skill to have my website look the same on every browser that was available. Then I encountered a Macintosh and I realised that it was I was trying to do was impossible because Mac OS Snow Leopard had different mechanism for rendering fonts than Windows. It shook me to the core at the time, I think I barely said anything to anyone for 2 days as I didn't really want to accept the fact that what I thought was pinnacle of ability with CSS wasn't actually possible. I find it quite amusing that I was once so absolutely naive.

comment 6y ago · link · parent

> Pfff - That's completely wrong. SPAs are all about performance.

Why are they consistently slower than especially when there is low bandwidth or bad reception (lost packets)? Your large JS script has to be downloaded and parsed by the browser. This is fine when you have high bandwidth and low package loss. But if the opposite is true that initial hit to get all your JS code can be really painful. Writing really fast JS is hard and is not normally something that can be done in a framework. I know React is better than things like Angular, but there is nothing faster than vanilla JS.

I write a lot of pure JS and I write stuff to be very fast. However it requires more effort and a higher skill bar (to the point where I am weaker at server side development and terrible with databases).

A lot of SPAs can be replaced with with a post back mechanism and some caching of assets (CSS etc) and a sprinkling of Ajax. The less you have to download, parse etc can really make things less painful when you are in that situation.

The problem is that many developers don't bother to learn JavaScript properly so unless you give them a framework like Angular or similar you end up with the jQuery spagetti of the past.

> Says who? I understand that the underlying structures of the web are all about transferring documents and other resources. But Gmail showed us that web 'apps' are useful. Why shouldn't we pursue that? Just because the original web architecture didn't account for it?

Documents and other resources are content. It is about displaying content in a meaningful manner to the user.

If it is something that the browser can't render (word docs for example) you need to deal with that appropriately.

Sometimes a plain page with some links to download your files is more than sufficient. I used the old gmail lite version for years because it was faster and did most of the same things. If you gave that interface some nicer CSS most people probably couldn't tell that it was quite old (if done right).

> Why shouldn't we pursue that? Just because the original web architecture didn't account for it?

Generally the browser already knows how to deal with HTTP and the OS knows how to deal with documents you download (if it has the right programs installed). So I think generally things just end up better when you try to keep as things were intended to be built.

I do however have the attitude of "the water takes the shape of the container" attitude to development. Whereas others don't.

comment 6y ago · link · parent

Yes. Sometimes you need to know why a particular thing was done.

Recently I had to go back and find out why a particular conditional was added to the code. 10 years prior someone added in a particular conditional for a bug in IE8 (which we no longer support). There was a Jira associated with it. I then knew I could remove this odd logic as it was no-longer relevant.

comment 6y ago · link · parent

The only thing that Google is significantly better at than google in location based searches in the UK i.e. local businesses. DDG map search is wrong for me about 50% of the time.

Everything else is pretty much the same as google or better in some cases (google seems to de-rank certain things). The code snippets when just quickly searching "How do I do <X> in <programming language L>" is quite nice.

comment 6y ago · link · parent

Generally I agree. However I would say with regards to iOS (not MacOS) and Android. While underneath they are both Linux and Darwin based respectively. Almost the entire OS anyone interacts (including most devs) is done through the Android and iOS APIs. They could replace what is underneath with something very different and you wouldn't be any of the wiser. There isn't really much to separate something like Ubuntu and MacOS in terms of what they are (other than polish).

In Jaron Laniers book "You are not a gadget" he says the open source community are very good at making clones of existing things but not inventing new things themselves. I would argue that programmers in general are very good at making clones of existing things. This has allowed Unix-like operating be ubiquitous as they are easy to copy and are good enough.

comment 6y ago · link · parent

WebTorrents work like regular torrents and can be downloaded via a torrent client. You could just provide a magnet link.

comment 6y ago · link · parent

On a site (which uses webtorrent) you can either serve ads (like youtube does), BAT (or equivalent) or have a subscriber model.

I would wage most people won't even know they are being served by the web torrent mechanism when you hit the page. The video player looks like a regular html 5 video player.

You can just point youtube-dl at a video. However the vast majority of viewers just use the site / phone app.

comment 6y ago · link · parent

> You'd need to build out your own infrastructure if you want to deliver videos cost-effectively.

For non-streaming video web-torrent is probably the best attempt I've seen as it offloads bandwidth to the viewers.

However the real problem that is impossible to get around is storage. To run a moderately large site the largest cost is storage as you will be seeding a copy of the video.

The few competitors (which are about <1% of youtube's views) are built quite poorly IMO.

You won't beat youtube by copying it. You need to build something new that addresses many of the short comings.

comment 6y ago · link · parent

They all use the C like syntax (with the exception of PHP, PHP is a bit of a mix tbh).

Sometimes it is better to keep with convention rather than change it even though it is considered incorrect.

comment 6y ago · link · parent

> Newspaper will always have some sort of bias because they are written by human beings and the bias is harmless as long as it's understood and recognised by the readership.

I would agree if there wasn't coordinated hit pieces between newspapers or if newspapers didn't appear to collectively ignore certain pertinent events.

comment 6y ago · link · parent

This feels like it is stating the obvious. However it is easily forgotten.

A lot of Software Engineers / Developers in my experience tend to over engineer projects or they are mandated they do so by so their dev leads. It is easy to get caught up into abstracting almost everything away almost for the sake of it while it provides no real benefit.

comment 6y ago · link · parent

There were steam engines in antiquity:

https://en.wikipedia.org/wiki/Aeolipile

Some argue that inventions like these at the time weren't improved upon because (slave) labour was cheap. But you are right it could be because other technology at the time didn't exist.

comment 6y ago · link · parent

I find it incredibly frustrating and tbh it saddens me when I say a generality in this case being "developers overestimate their worth to the business" and people chime in with all the exceptions that they think disproves it. Obviously there are exceptions to the rule.

However unless building the tech is the business you are seen just as a cost to the business in most circumstances.

comment 6y ago · link · parent

It isn't a cynical view. it is reality. The Chinese state have shown ever since Mao they have little or no regard for Human life. Off the top of my head (I am sure there is much more):

https://en.wikipedia.org/wiki/Great_Leap_Forward#Treatment_o...

https://en.wikipedia.org/wiki/1989_Tiananmen_Square_protests

https://www.bbc.com/news/world-asia-china-45474279

Also their response so far to the current Epidemic i.e. trying to cover it up has cost the lives of people in many countries.

But apparently I am being cynical ...

comment 6y ago · link · parent

Many people here will talk about practices etc. But tbh I think before that you need to make sure that whoever is in charge is bought into whatever you are going to be doing.

If that isn't in place. Any such endeavours will fail as other people in the business just won't bother.

comment 6y ago · link · parent

The business stake holders are going to be there. Sure at some point it might be just too much work but typically there is somewhere in between where you can piece it together.

> I don't mean this in a deragoratory sense - it sounds to me you provide great value to your employers - but just in that you work in a specific market segment and what is true in your segment might not hold in others.

I've worked in many different sectors. Normally fintech though.

comment 6y ago · link · parent

But you wouldn't pay £1.30 for high octane petrol when you could pay £1.25 across the road.

comment 6y ago · link · parent

Interesting that is above London pay rates even though having a look at the price of living it is only 20% more expensive. Probably just less .NET devs over there. Might have to apply for roles in Stockholm :)

comment 6y ago · link · parent

Sure Domain Knowledge is important. But again this can all be discovered as you go along.

I had an interview at a this week for my next contract where they made redundant most of their employees as the business decided to just go with turnkey applications.

They will get someone like me in for 3 to 6 months to do application maintenance on anything they can't replace. This will be stuff like implementing stuff from penetration-testing, upgrading the applications and documenting missing bits and pieces and letting the business know what needs doing and where.

I don't need a pension being paid, no HR overhead (they can just ask me to leave whenever pretty much). I will be able to gleen enough from the business and their IT to piece the bits together. This is literally my bread and butter.

1
45678