HNHacker News
TopNewBestAskShowJobs

scriptkiddy

559 karma · joined August 26, 2016

submissionscomments
scriptkiddy··on Deep learning may need a new programming language
> The only thing I find inconvenient in Python is you can't simply put every function (including every member functions of a class - that's what I would love to do) in a separate file without having to import every one of them manually.

When you create a .py file, the CPython interpreter treats it as a "module". You can basically treat a Python "module" as if it were a class because the global variables are automatically scoped unless you import them explicitly. You could actually write some code that would allow you to instantiate the entire module in the same manner you would instantiate a class. Though, I have no idea where this pattern would be useful.

scriptkiddy··on Family spaghetti of programming languages
Seems strange that Python isn't listed as a descendant of SmallTalk.
scriptkiddy··on Reflecting on My Failure to Build a Billion-Dollar Company
I have to say, this was a very pleasant read. I expected it to be a thinly vield ad for some new business, but it was actually very insightful.

Seems to me like the author's failure taught them a valuable lesson about what they actually valued vs. what they thought they valued.

I would like to see more tech companies like Gumroad; that is companies whose focus is not on IPO and quick aquisition, but instead, on the quality of their product/service and the prosperity of the customers/users.

scriptkiddy··on Ask HN: What's the recommended method of adding authentication to a REST API?
Well, I mean that's true of almost every authentication method. If I have 2FA set up and someone knows my password and has access to my phone, of course they get into my account. I have a pentester friend who told me once: "Nothing is unbreakable or un-exploitable." I tend to believe that. Things like social engineering can always be applied to get the information you need to spoof credentials or gain access to critical systems. If someone is motivated and has enough resources, there's no amount of security methods that can stop them.
scriptkiddy··on Ask HN: What's the recommended method of adding authentication to a REST API?
That is an interesting limitation. I'm sure there is some way to get around it. However, I'm not a network security expert. I just thought using SSL certs for authentication was an interesting idea.
scriptkiddy··on Ask HN: What's the recommended method of adding authentication to a REST API?
Cert renewal can be automated the same way letsencrypt does it for instance.
scriptkiddy··on Ask HN: What's the recommended method of adding authentication to a REST API?
I Found a somewhat interesting solution for this issue. I assume you know what an ssh public/private key is, correct? Well, apparently, there is a way to apply this concept of ssh public key authentication to the HTTP protocol.

This technique is referred to as "Mutual Authentication": http://www.cafesoft.com/products/cams/ps/docs32/admin/SSLTLS...

Basically, it's 2-way SSL. You use signed SSL certs to authenticate the server to the client and the client to the server. You could use your own cert signing server or employ a third party cert signing service.

Using this method, your techs would need to set up the SSL cert for the client machine when installing the software, or, the SSL setup procedure could be part of the software installation procedure.

Interesting idea that may solve your problem. Hope this helps.

scriptkiddy··on Extensions in Firefox 58
It's really not though. Try to put yourself in Mozilla's shoes for a moment:

You run arguably the most "free" and "open" internet browser in the business. You are constantly pushing for standardization in the face of competing browsers like Safari, Chrome, and Edge; all of which are trying to establish a walled garden powered by browser specific features. Your browser is consistently losing market share to Chrome because you don't have the cash to spend on marketing partnerships and pre-installs like Google does. Your browser is a means to an end, not the end itself. Your browser exists purely to push forward the tenets of the open internet and open source software. You need market share to push further standardization and improvements to the web experience. To get this market share you need to ensure that your browser offers at least the same performance and security as other browsers. In order to do this, you need to make some backwards incompatible changes or risk falling into obscurity. It's a sacrific you have no choice but to make.

scriptkiddy··on Mastering PostgreSQL in Application Development
Hmm. Firefox 56.0 running on Ubuntu 16.04 and it's working fine minus the hijacked scroll. Note to all front end developers: STOP HIJACKING SCROLL! It's bad UX. No exceptions.
scriptkiddy··on China orders N.K. firms to close down within 120 days
Agreed.

Sadly, for the sake of the world, we need to let KJU go unpunished.

Let him live out his days in a cushy mansion in China so that he doesn't start lobbing nukes everywhere.

I believe that to be the sanest course of action.

scriptkiddy··on W3C abandons consensus, standardizes DRM, EFF resigns
I think the only real difference is that, generally speaking, systems programming standards and best practices don't change weekly. Or, maybe they do. I don't work in that field professionally.
scriptkiddy··on W3C abandons consensus, standardizes DRM, EFF resigns
> There are so many excellent films made in the second half of the twentieth century that most people will only encounter when, ironically, a broadcaster shows it on classical linear television.

Yep, I would have never discovers Jeremiah Johnson without TMC.

> Here is a radical though: reduce copyright to 28 years, and let the Netflixes and HBO's compete against that! Not going to happen of course — the best some of us can do in the meantime is pretend copyright did end after such a term, or just meekly submit to whatever is made available, DRM-shackles and all.

This is the real root of this issue. You're completely on the right track.

Originally, copyright only protected an idea for a very short amount of time. Basically the amount of time required to go to market with an idea. Copyright was intended to protect the little guy entering the industry so larger competitors couldn't steal their ideas until after the little guy entered the market.

Now, on the other hand, copyright accomplishes the exact opposite. It protects the big guys by ensuring that no-one can ever use or improve upon their ideas/products without their express consent for what seems like an eternity(see Disney constantly requesting copyright extensions on Mickey Mouse). There should be a hard limit on copyright of 5 years, maybe 10 for IP. As you said above, this will never happen as there are too many people and companies feeding off the current system. Disrupting the status quo would result in an eruption of outcry from studios, record labels, and publishers.

That said, I think we can all agree that is absolutely absurd that record labels are still profiting off of albums where every person who worked on them is now dead for an example.

Let's also be real here and address the issue that artists don't really benefit from signing on to contracts with large corporations outside of maybe better publicity. 90% of the proceeds from listens on spotify or shows on Netflix are going to the companies that own the rights and not the musicians/actors. That's why most non-mainstream music is moving into self publishing/independent labels.

scriptkiddy··on W3C abandons consensus, standardizes DRM, EFF resigns
> We've regressed to the point where 5KiB of text comes with 2MiB of crap, meaning a noise to signal ratio of 26dB which is insane!

Unfortunately that's what the average layman wants. They want the SPA experience. That's what they want to pay for. What kind of professional am I if I don't give people what they want to pay for?

> I've even had enough of building things on the web. It is a horrible horrible thing to have to do. I envy system programmers who never see the pain of trying to keep a very large web application secure at even a basic level.

I build and maintain full stack web applications for my day job. Man, is it a pain. Between the database setup, server setup, back end application, front end application, security concerns, and browser compatibility issues, I rarely get to spend any time at all working on the business logic. Seriously, modern web development is 90% chasing down bugs, security enforcement, and fixing compatibility issues. Writing the business logic is the easy part.

scriptkiddy··on W3C abandons consensus, standardizes DRM, EFF resigns
> The only company on the list of browser makers that really has any desire to try to exclude DRM is Mozilla, and unfortunately, if they do that, the users will switch to the browser that makes watching Netflix easiest.

This is the world we live in. People are willing to sacrifice privacy and security in favor of convenience. Sounds a hell of a lot like a book I read in high school.

People are so willing to make these sacrifices because they don't even understand what they're sacrificing. They don't understand what they're sacrificing because they couldn't be bothered. Apathy is the disease that will bring down the world. I'm calling it now.

scriptkiddy··on Thanks, but I have accepted another offer
You're making a mountain out of a molehill.
scriptkiddy··on If Mark Zuckerberg runs for president, will Facebook help him win?
> No, the budget cuts do not adversely affect the working class. The working class collectively pays more taxes than the richest because working class makes a much larger portion of the population.

Well, yeah. The wealthy benefit from all the things their taxes fund even more than the working class does. The wealthy pay disproportionately little considering that their wealth is built upon the infrastructure that the working class pays for. Consider that a wealthy person cannot make any money if their workers are not able to get to work because of poor infrastructure. Consider that the wealthy benefit from public education training their workers.

> That money is being wasted on education which is useless as far as getting employment after it is concerned and other government programs let the corrupt politicians decide who gets the business.

I'm trying to parse this. I'm not sure what you mean, but you seem to be claiming that education is "useless"? You go on to say that education does not help people get jobs. I mean, it's clear that education has a large role to play in employment rates. Besides that, the goal of education is not to ensure people are employed; it is to ensure that there is a well educated populace capable of making sane, rational decisions. I'm not going to try and tackle the last part of your statement here because I have no clue what you're trying to say.

> Tax cuts on the rich doesn't affect the amount of money collected significantly and in addition to that encourages the lower income people to justify earning more.

"forces the lower income people to justify earning more"? I apologize if you're not a native English speaker, but I'm really having trouble trying to make sense of what you're saying here. Why do lower income people have to "justify" earning more? We live in a society where the amount of effort you put in generally determines what you get out of life. No one has to "justify" earning more except for maybe trust fund babies and people who inherit large corporations.

> Even the Democratic party was not in favor of Sanders because socialist and communist parties in failed countries, the DNC understands that socialism doesn't really work. They pretend that it does and might say it for votes, but seeing someone who would actually go ahead and try to do it would make things much worse for the country. As evil as Hillary is, everyone should be thankful that she made sure Sanders didn't get a chance.

I see a lot of people parrot this exact point all over the place but no one ever offers any logical argument as to why. No one can explain how socialist policies/programs would ruin the U.S. They just say it and then move on assuming its some sort of universal truth.

> Yeah right... because if you want to help people, you should take their money forcefully and then give it to a slow, inefficient bureaucratic system which will solve all their problems.

You mean like the manner in which the U.S. currently operates? We have the ability to build a post-scarcity society but most of those who control the means of production are too selfish to see past their own noses.

> No. All big healthcare programs around the world are costing a bigger chunk of the budget every year and have thus far been sustainable because most of the healthcare innovation happens outside of them i.e. in the US, which they simply import.

[citation needed]

Seriously though, I'm gonna need some numbers on that before I take it at face value. Even if this is true, I'm sure there are some factors that you are willfully ignoring.

> Except for the corruption he is being investigated for.

Got a source for that? The only thing I found was something about sanders paying his wife and daughter to work on his senate campaign from 2002-2004. A total of $90,000 dollars for his wife over two years and $65,000 dollars for his daughter over four years. Broken down, that's a $45,000/yr salary for his wife and a $16,250/yr salary for his daughter. Seems to actually be a rather low salary for campaign officials. And a bunch of unconfirmed reports about Bernie's wife overstating donations for the college she worked at in order to secure a pledge from the catholic diocese. The accusations seem to be levied by a formal Trump campaign official as well. Could be a smear campaign. Doesn't seem like much is coming of it. On top of this, none of the articles I read offered any credible sources whatsoever. There's just not enough there for me to draw any reasonable conclusion. This is the closest thing to a credible source that I found: https://www.cbsnews.com/news/bernie-and-jane-sanders-under-f...

> Having no experience in anything else outside of mindless activism and politics makes one delusional, so while I also think he legitimately believed in his ideas, I can't see it as a good thing.

Why do you jump from "believing in ideas" to "mindless activism"? Why can nobody ever see the middle ground. For most people it's walways black or white. Well, sometimes, the correct answer is gray.

scriptkiddy··on If Mark Zuckerberg runs for president, will Facebook help him win?
I don't have a problem with it as long as the ideas aren't harmful.
scriptkiddy··on If Mark Zuckerberg runs for president, will Facebook help him win?
I can understand your disdain for the Democratic party. I share it.

However, if I may offer up some counter points on Sanders specifically.

First, let's be clear that the republican party does not have the interest of the working man at heart either. Let's not forget that the first actions of almost any republican candidate in recent times almost always involve tax cuts for higher income brackets and budget cuts on education, infrastructure, health care, and environmental programs. These budget cuts adversely effect the working class.

Second, Sanders wasn't really aligned with the democratic party. In fact, the system was purposefully rigged against him. This isn't a conspiracy theory. Many high ranking officials of the DNC have admitted to it.

Third, Sanders was the working class' best hope. He was in favor of raising taxes in all brackets in order to raise money for public works programs, universal healthcare and no-cost tuition for higher education. As you might imagine, these platforms definitely rustled some feathers. Not only was his platform based around dismantling the racketeering industries that are higher education and medical insurance, his platform also seemed somewhat gasp socialist. Socialism is a dirty word in the U.S. no doubt because of the cold war. However, these programs were shown to be successful in other nations in Europe and also in Canada.

Fourth, Sanders was the most honest and squeaky clean candidate that has ever run for the office. He legitimately believed in his ideas, he wasn't in the pockets of large corporations, he had a voting record consistent with his platform, and there is historical evidence of him supporting strikes and equality protests.

All I'm asking is that you understand that Sanders wasn't a Dem candidate. He wasn't running on party platforms. He was purposefully ousted by the party because they knew he wouldn't listen to them and their corporate backers. Sanders used the Dem as a way to gain legitimacy. He really had no choice considering that most people in the U.S. consider third party candidates to be a joke.

scriptkiddy··on Coding Boot Camps Get the Boot: Why the Industry Is Shutting Down
> That's true. I wouldn't necessarily agree that it's easy.

I assume you mean the self teaching part? Agreed. That's why I said simple. I should have been more clear.

> Without initial guidance and a firm commitment, we end up with questions like, "Should I learn Java or Javascript?" or "Can I learn Go in a week?" Is it possible to self teach completely? Yes. But you would need both discipline and analytical rigor as well as the humility to find help when you run into issues. I went into the bootcamp looking for both a mentor, which I found, and connections, which I also found.

I think this is a good way to look at it. I'm personally 100% self taught. I actually dropped out of college(financial issues), but I'm glad I did. I was able to learn so much more on my own. I can understand how a lot of people wouldn't be able to do what I did because they just don't see things the way I do I guess. For the type of people who require guidance from the more experienced, I think what you said above makes a lot of sense.

I would, however, caution anyone who is an autodidact from going to a bootcamp simply on the premise of it being extremely expensive. If you have the ability to teach yourself these skills, there's really no good reason to spend tens of thousands of dollars on a bootcamp to learn at a pace dictated by your peers.

scriptkiddy··on Coding Boot Camps Get the Boot: Why the Industry Is Shutting Down
> We may get to a point where building software is more like building a car, and we just need humans to work on the factory assembly line. But we're not there yet. So the experiment failed.

I've seen this sentiment being thrown around a lot lately. I don't think it will ever be the case. There will always need to be someone who can build the tools or the tools that build the tools or the tools that build the tools that build the tools.

Let's use your auto assembly line idea to illustrate this. A good portion of auto manufacturing these days is completely automated, the body is assembled by robots for instance. Well, a factory had to build those robots, right? That factory probably bought some robot control software from another company who specializes in that. The company that built the robot probably didn't manufacture all of the components for the robot. For instance, their welding robot may have a wire feed spool that was manufactured by a company that builds welders. However, the company that manufactured the spool probably didn't forge the metal themselves, they bought it from a forging company. That company in turn bought ore from a mining company. The mining company mined that ore using an automated tunnel boring machine. The automated tunnel boring machine was built by another company that manufactures automated mining machinery, and the trail starts anew.

Somewhere down the line in every industry is an engineer who designs and possibly even builds components that are necessary for that industry to operate.

Now, applied to software engineering:

Even if we did have software that could automatically build a web application tailored specifically and exactly to what any given company wanted down to website design and SEO, that software would have still need to have been built in the first place. If that software was built by another piece of software and so on up the line, at some point there is a person who built the progenitor. Regardless of who built the original, wouldn't these pieces of software still have bugs? What if these pieces of software involved more software that could fix their own bugs? Well , who fixes the bugs in the bug fixing software?

Beyond this, what if there is a new feature that needs to be built out? Will the software be able to build out that new feature and integrate it with the existing application? If so, how will it handle conflicts?

As it currently stands, it takes a team of multiple professionals to simply maintain any non-trivial codebase. I don't personally believe that it is possible to design an AI that is powerful enough to do this kind of work without this AI having human levels of intelligence and creativity. In order for this AI to be able to reach this kind of proficiency it would have to be self aware. And then we are forced to ask the question: is self aware AI still AI, or is it alive? We are not ready to answer these questions. Until we are, there will always be a need for flesh and bone engineers of all sorts.

That ended up way longer than I intended.

scriptkiddy··on Coding Boot Camps Get the Boot: Why the Industry Is Shutting Down
Just like most things in life, you get out of it what you put into it.

> I like to think that bootcamps are just an extension or tool to employ as an autodidact.

If you are an autodidact, a bootcamp isn't even required. The Internet is chock full of resources for learning programming that makes it extremely simple to learn on your own. I look at a bootcamp as paying for connections. A Bootcamp should help get you in touch with prospective employers or connect you with other developers with similar goals. Learning how to program is the easy part when compared to learning the soft skills required to be part of or build a successful company.

scriptkiddy··on Coding Boot Camps Get the Boot: Why the Industry Is Shutting Down
I kind of tend to agree. I have been a professional developer for about 3 years now. I am 100% self taught. I think I have a natural knack for the field as ever since I was able to read I have been constantly absorbing information about physics and chemistry. I worked as an auto mechanic for a few years and then I moved into industrial fluid process design. After that I landed a job with a (really shitty)web development agency. Now I work under contract for a startup(1099). I really believe that my passion for science and my previous work experience prepared me to deal with all of the complex technical expertise required to be a competent developer. Not everyone can be so lucky.

I have tried to explain basic computer hardware/software concepts to some friends of mine on many occasions. Some of them are right on board with what I'm talking about immediately while others are either completely uninterested or unable to grok the concepts. Usually the ones who grok it are people who already work in technical fields like my buddy who works in machining, or my other buddy who does welding, or my other buddy who is a market analyst(just helped him learn Python for data analysis).

Not everyone can be a competent developer, and that's OK. There are many other positions within a tech company that are just as important, like project leads or designers.

scriptkiddy··on Stop trying to kill the headphone jack
Here's my problem with bluetooth:

Sound quality.

Bluetooth is not able to offer the fidelity of a standard 3.5mm jack. Until it is capable of doing so, I will not even consider using bluetooth headphones.

Plus, industry standard high-fidelity and studio quality headphones don't come with bluetooth due to the fidelity issue. I already have a several hundred dollar pair of awesome headphones. Why would I purchase a phone that I can't connect them to?

Let's call the removal of the headphone jack what it is: a cash grab. The only reason manufacturers are doing this is to increase profits. By removing the 3.5mm jack companies no longer have to pay for the part or attaching the part to the board. On top of this, manufacturers can now charge for special dongles and proprietary wireless headphones.

scriptkiddy··on Why we moved from Angular 2 to Vue.js and why we didn’t choose React
You'd be surprised how simple it is to re-write an application in Vue. As someone who just finished doing so, I can say that development speed is like nothing I've ever experienced. The application I rebuilt initially took about 2 months to build with React. I rebuilt it with Vue in 2 weeks by myself. I am not venerating Vue, just simply responding to your concerns about rebuilding entire applications.
scriptkiddy··on Leaving Python for JavaScript
I couldn't agree with you more. I think that Python's lack of complex anonymous functions actually forces the programmer to compose their code in a more efficient manner.
scriptkiddy··on Leaving Python for JavaScript
> Hm, actually, it's not. I'm surprised by this comment. I point out precisely the JavaScript features that weighed the most in my decision: "So with JavaScript you've got arrow functions, the method shorthand definition syntax, the spread operator, destructuring assignments, all functional Array methods and async functions. Combined with Vue's minimal patterns and Nuxt's conventions, I can't think of a better language to write web applications in."

I saw that. I guess I just expected you to go into detail about why you believe things like that are better. I use JS a lot in my day-to-day work for the front end of my web application. I also use Django and Python for my back-end. I'm well aware of the differences between Python and Javascript as they are the two languages I work with the most. I would not consider either language "better" than the other except at specific tasks. i.e. I can't really use python to build an SPA and it would be a pain to use Javascript for anything involving heavy number manipulation. I guess what I'm saying is that you should always choose the right tool for the job; sometimes that will Python and sometimes it will be JS. Other times, it might be something else. I'm always a little confused when someone decides that they're going to start writing everything in a particular language even when other languages are more suitable for the task.

> Exactly that, a "function body", "closure", "inline function", whatever you wanna call it. In Python there are lambdas, but they're limited and not even encouraged anymore. We're left with passing function references, and that's where JavaScript comes out the winner IMHO.

To each their own I guess. I feel like programmers these days automatically assume that more functional == more good. There are cases where using FP techniques is definitely advantageous. However, there are also circumstances where OOP is a better choice. I find that Python is equally capable of both paradigms. The idea of anonymous callbacks is good from a productivity standpoint, but readability suffers. Anonymous functions in general cause cryptic error messages and are difficult to debug. I've found that the over use of anonymous functions can also lead to a lot of duplicate code. There are many cases when an anonymous callback would be better if refactored into a named function. I believe that having more named functions aids in creating an efficient program compostion, even when using the FP paradigm. There is one use case where Javscript is much better suited than Python: web applications front ends. This comes as no surprise as JS was designed for exactly that purpose. Asynchronous callbacks and promises cannot be beat when dealing with fetching data from an API.

scriptkiddy··on Leaving Python for JavaScript
> (my Python is pretty rusty so maybe there's a better way of doing that)

    return [x*2 for x in nums]
scriptkiddy··on Leaving Python for JavaScript
Just in case the author is present in the thread:

Your blog is extremely difficult to read on wide screen monitors. The entire left 50% is basically just blank space. My suggestion is to make the left side maybe 20% width on desktop or less.

Also, regarding the article content:

There really aren't any good reasons presented here about why you moved from Python to Javascript for back-end web development. It seems that you simply prefer Javascript semantics. There's nothing wrong with that, but the title is misleading considering that the bulk of the article is actually about which JS tools you use on recent projects and not why you moved.

Also, could you clarify what you mean by

> Also, there's no acceptable way to pass a function body to another in Python.

Functions are first-class in python and can be passed as arguments to other functions. I'm not sure I understand what you mean with the above statement.

Cool to see someone else has been using Nuxt though.

scriptkiddy··on A 2:15 Alarm, 2 Trains and a Bus Get Her to Work by 7 A.M
I would be strongly in favor of reforming that law then. I have not seen anything regarding it come up on any of the recent ballots.
scriptkiddy··on A 2:15 Alarm, 2 Trains and a Bus Get Her to Work by 7 A.M
I wonder if they're trying to predict the future. Perhaps they foresee business moving in in the future.
← PreviousPage 4 of 10Next →