HNHacker News
TopNewBestAskShowJobs

levelist_com

81 karma · joined July 10, 2015

submissionscomments
levelist_com··on Pilot of drone that struck woman at Pride Parade gets 30 days in jail
Anything can be dangerous in the hands of an imbecile.
levelist_com··on Introducing Netflix Stethoscope
The only argument I would make against your points 1 & 2 is that I as a developer can't assume that a person with a rooted device knows what they are doing. For instance... I have a number of friends that have purchased rooted devices for the sake of using things like Kodi, against my advice. They do not understand their devices, or why downloading movies that hit the theater that day is illegal b/c they legally downloaded Kodi or bought a Kodi device legally. I am constantly having to fix/wipe them because they dont even understand the basics of security, ( i.e. they click ok on every popup without reading them, etc). Fortunately they pay me as I have refused for many years now to give free support, even to family. Anyhow, whenever my friends buy phones and other media devices, they almost always without fail and without asking my advice, purchase rooted ones online. Hell, for all they know, those devices could have software on them specifically for keylogging, etc.. and they would never know. So yeah, you can't assume a rooted device is in the possession of a competent user.
levelist_com··on FCC rescinds claim that AT&T and Verizon violated net neutrality
No worries. It is my understanding, that as of last Friday the FCC will no longer enforce Net Neutrality rules.

https://www.dslreports.com/shownews/Trumps-New-FCC-Boss-Halt...

https://variety.com/2017/biz/news/fcc-mignon-clyburn-ajit-pa...

so... problem solved? s/

levelist_com··on Bootstrap 4's mobile-first flexbox grid system, now used by default
The only problem I ever had with tables being used for things other than tabular data was strictly from an accessibility POV. I had 2 blind roommates in college and helped set up their screen readers. It was nearly impossible for the readers to follow the page so when it was outputting audio it just sounded ridiculous. So much so that my roommates just gave up on their computers and and would take their assignments into some office to have student aids type them up for them and to help them do online research when I wasnt available. Switching sites to tableless css design helped immensely. I dont know if things have changed but that would be my reason against table design, pure accessibility.
levelist_com··on Open offices are bad for us
I agree. I used to design voice and data networks for call centers and I would always be part of the planning phase. A lot of times I would have to go with call center owners when they would go inspect cubicles they found and potentially wanted to buy, so as to answer any questions about how they will be connected to power, network, etc.. I was always amazed at just how expensive cubicles were. I mean, for what they are. One of the call centers was owned by a construction company. They originally went with cubes but in their next call center they built cubes out of drywall, not quite offices obviously - but looked really good, at mere fraction of the cost.

As a person that has worked in both open and closed floor plans, ill just say this, I miss working from home and cant wait to go back.

levelist_com··on To Be a Young Black Man Working in an Office Full of White People
We aren't really having a conversation now. I explained why I don't think it could/should be interpreted as racist. You had an opportunity to share with me why it could be, allowing me to perhaps be enlightened and form a new opinion; however, you chose to throw insults and shut down the convo.
levelist_com··on To Be a Young Black Man Working in an Office Full of White People
Yes. And I said I don't know why it could be "interpreted as racist." and followed it up with my reasoning.
levelist_com··on To Be a Young Black Man Working in an Office Full of White People
I'm not sure why It could be interpreted as racist? It's not like the person assumed b/c the man is black that he could rap. The man admittedly already wrote the rap for a known project and was asked to or assumed he would be ok to perform it for another venue. The man declined stating he wasnt comfortable doing so and ended with no further incident. Rude possibly. Racist? Not even close!
levelist_com··on To Be a Young Black Man Working in an Office Full of White People
From experience, I'm going to guess, it was the glaringly obvious chip on his shoulder after believing that he was passed over for a job, he felt he was more qualified for, b/c he is black.
levelist_com··on Samsung to Permanently Discontinue Galaxy Note 7 Smartphone
As a person that owns both a Samsung Washer & Dryer (they just did a recall on top load washers I believe), a Samsung Refrigerator, and at one point a Samsung television, I can assure you all of their products (that I have owned or currently own) are poorly designed, and more so, poorly manufactured garbage. I will never knowingly buy a Samsung product again. I replaced the TV after it came out about their efforts to track user behavior, etc.. The TV and its apps were garbage anyhow. Stay away from Samsung.

OTOH, the Galaxy S3 wasnt too bad, but perhaps that's b/c I have been conditioned to bad phones since every phone I've owned since the Motorola flip & the Razr has been complete shit.

levelist_com··on As Our Jobs Are Automated, Some Say We'll Need a Guaranteed Basic Income
I only have very basic understanding of LVT but I don't see how it is the magic variable that makes UBI make sense. Could you explain?
levelist_com··on As Our Jobs Are Automated, Some Say We'll Need a Guaranteed Basic Income
I get the premise behind your answer I believe. What I am asking is, what's to stop the markets (especially in the US where greed reigns) from increasing the cost of things such as food and shelter artificially b/c of this free money, making this "basic income" all but useless? Meaning at some point it wont even cover the most basic and modest of necessities.
levelist_com··on As Our Jobs Are Automated, Some Say We'll Need a Guaranteed Basic Income
Im not sure if you answered my question or that Im not smart enough to understand the answer. I guess I should have added an ELI5 to my question.
levelist_com··on As Our Jobs Are Automated, Some Say We'll Need a Guaranteed Basic Income
You answered my question with a question? Ok. Yes, in answer to your question, my understanding would be that if there is a market/demand for cheap food, then yes, someone will supply cheap food. However, let's assume for a minute that "cheap food" is a finite resource, and lets assume people are being guaranteed money to purchase the aformentioned "cheap food". Eventually that cheap food becomes more expensive. You know, demand being greater than supply. So someone else comes along and produces cheaper food to address the situation but they face the same eventual problem. Also, its only so cheap you can make food without gov't subsidies b/c a) the cost to produce/distribute and b) gov't regulation on quality. But what we have here, in a sense is artificially created demand b/c of free money, free being money given, not necessarily earned. Again, I know nothing about these things and I want someone who does to actually educate me not give me some bullshit snarky fucking reply.
levelist_com··on As Our Jobs Are Automated, Some Say We'll Need a Guaranteed Basic Income
I'm curious, and this may have been discussed elsewhere, but how would that work in a country like the US (both in terms of size of population and capitalistic greed)? For instance, when student loans became ubiquitous, universities raised their rates. Now there are many theories as to why that was but I feel the simplest explanation is that a) it created greater demand, and b) easy/cheap money (look at ITT). What's to stop rents/mortgages from increasing, cost of goods increasing, basically the cost of everything going up b/c a) people have guaranteed money and demand more goods, and b) simple greed? In my mind it wont be long before that "basic income" isn't enough live on at all. Now I know this seems to be a difficult problem to solve, but I don't think throwing "free" currency at it is going to do anything but drive the value of that currency and it's buying power way down. Im most likely very wrong ( i have zero knowledge sady enough of money and how markets and economies work) - I would just love someone to explain to me how this is even an option - I want to understand?!
levelist_com··on The man behind the million dollar homepage 11 years later
The company I worked for at the time this site gained notoriety would field several calls a week from individuals and companies both wanting to have a clone of that site built thinking they would achieve the same level of success. About the same time I had an investment group contact me, via a close friend, to build them a Match.com clone, except their time frame was 3 months with a budget of $15k. I told them that they lost their damn mind. Didn't hear from them again. People are dumb!
levelist_com··on Microsoft Edge now gets even more out of your battery
That's interesting to know, thank you. Just so I am clear, you have domains that end with .local?
levelist_com··on Microsoft Edge now gets even more out of your battery
... or that you can have a .local domain (added to hosts file) for a local VM, every other browser can hit with no problem but not Edge. The only solution I have found that consistently works is to start Fiddler4 (as described in the 4th comment down by Dave Kennard - https://stackoverflow.com/questions/32384571/why-does-micros...). Then it works.
levelist_com··on Response to “Literate programming considered harmful”
I agree and chose to take the deductions rather than avoid writing comments. By that point I had already been in the industry and I knew better; he has never left academia.
levelist_com··on Response to “Literate programming considered harmful”
Funny enough, I had a C & C++ prof deduct points for comments with the argument that they were redundant and that the code should be self documenting. Then again, this is from a guy who never handed back assignments until the end of the semester and by then couldn't remember why he graded you the way he did. Would just respond with "you didn't understand the material".
levelist_com··on Why People Should Learn Python
There is probably some truth to this. Every single contract I have been offered in the past 2 years including the one I am currently working required PHP5.6 & 7 knowledge, git, composer, JS, the latest JS frameworks, etc. Start the job... PHP5.3 codebase w/ some old jQuery. Its an absolute nightmare. I have to go home at night and write in PHP7 just to maintain some level of sanity or I'd have to cry myself to sleep. The only thing that makes the job tolerable is that I was able to load xdebug on the dev environments (though it doesn't always work b/c of all the redirects - it still is good enough to get me 90% of the way there).
levelist_com··on 1700 blogs for hackers
Was it the one where his father was a retired doctor or something like that and he, the son, just blogged the things his dad would say through out the day? Actually as I type this, I think it was a twitter account. Either way, it was hilarious. I'd love to find that again.
levelist_com··on JSON Web Tokens vs. Sessions
What you're doing is increasing complexity, even if marginal, for no benefit and to the inconvenience of your users; Sometimes, increased complexity does introduce insecurities, but I digress. The developer has little to no control over what type of network (wi-fi, public hotspot, hotel, corporate, private, etc..) a user accesses the site with and the user couldn't care less how sessions are managed (for the most part), all they know is if their token becomes invalid on each request because they are using a network that pools and rotates IP addresses b/w users/requests, forcing them to re-authenticate with each request, well, you're going to have some very unhappy users.
levelist_com··on JSON Web Tokens vs. Sessions
You should not tie any functionality, user experience, and last but certainly not least, security to an IP address. IP addresses can be spoofed rather easily, using public wifi, hotel/guest networks, and even certain ISPs means the rotating of IP addresses on each user request.
levelist_com··on Viber adds end-to-end encryption
Or ... people name their products/companies based on their ability to secure a proper domain name, rather than being some hipster startup founder trying to appear edgy. Does Viber seem like a name that would be taken?! Listd.com vs listed.com was one I had to deal with some time ago.
levelist_com··on Ask HN: What are the best practices for web authorization at the moment?
Over the years I have tried many implementations, first using a binary system

0 - guest(0) 1 - user(1) 10 - moderator(2) ... 10000000000 - admin (1024) ... 1000000000000000 - superadmin (32768)

basically, a new role had the highest order bit set to 1, then the rest zeros. To add a user to moderator and user (11), or admin & moderator (10000000010), for example, you would do something like this. At the method level I could either do bitwise operations to check for certain bits being set to 1 or I could just check that the decimal was >= a specific decimal value (but this could allow users I may not want having access). The limitations being many, not least of which: what should I set superadmin/superuser to b/c this determines the max amount of future roles that can be added without going through the code and refactoring.

I then moved to a system of roles and user permissions, meaning I had permissions at the group/role level and permissions at the user level. I would merge these permissions together when user is authenticated. At the user level I could remove a role from a user belonging to a group by adding the same permission as found in the group but with an integer -1, or i could add a permission to a specific user with an integer value of 1. I was still checking for role and permission at the user level. This was better in the sense that I could add as many roles as I wanted, as many permissions as I wanted. Merging permissions was a bit of a pain but once it was all worked out it worked pretty good. I was still checking for roles/group membership and permissions at the method level and well this causes a lot refactoring when you want to change what permissions and groups can execute a particular method. I had always felt this was a pain and this system was a bit of overkill but it did exactly what was needed at the time.

I then came across an old article, pretty sure it was this one - https://lostechies.com/derickbailey/2011/05/24/dont-do-role-... - and it led me to the path, right or wrong, that I do now. I create a table for permissions, users, groups. I then create a pivot/join table between groups and permissions, and a pivot/join table between users and permissions. This is so I can give group level and user level permissions. an example permission might look like this: user.create, user.delete, user.update, user.block, user.suspend, etc.. At a user group level a user may have all those permissions but user.suspend, but I may want a specific user to have user.suspend capabilities but not the other capabilities that come at the next level, say moderator, so I keep the user in the user group but give them user.suspend permissions at the user perm level.

Now when those two permission groups are merged (group, users) this makes up the permissions available to a given user.

At the method level I just check for a specific permission ... so at the method to create a user, I check for the permission user.create. At a user update method I may check for user.update permission and maybe the user id (dont want a user updating someone else's profile). The point is that by looking for a specific permission rather than group(s)/role(s) I cut down the amount of refactoring I need to do. Every scenario I've outlined has pros and cons. For instance, what happens if I have a user that can update anyone's profile but i'snt a superadmin or admin?? Maybe create a new permission that give global.user.update and check for both of those. Who knows?!

Hope this gives you some ideas.

levelist_com··on Introduction to Microservices
perhaps JSON Web tokens between main API and microservice where both have a shared secret?
levelist_com··on Introduction to Microservices
Great talk. This may be a silly question; however, how do you handle authentication between the main app and the services? Im in the middle of building a sizable application but have begun offloading some of the tasks to microservices, for many of the same reasons you gave. I currently use OAuth2 to authenticate to the main API, but dont really want to add additional overhead by having to authenticate to each service as its needed.
← PreviousPage 2 of 2