2016 week 45 in programming

Some guy named Marc Andreessen was convinced that Netscape should embed a programming language in HTML => Javascript gets written in 10 days flat.

Brendan Eich convinced his pointy-haired boss at Netscape that the Navigator browser should have its own scripting language, and that only a new language would do, a new language designed and implemented in big hurry, and that no existing language should be considered for that role. As I’ve often said, and as others at Netscape can confirm, I was recruited to Netscape with the promise of “Doing Scheme” in the browser. At least client engineering management including Tom Paquin, Michael Toy, and Rick Schell, along with some guy named Marc Andreessen, were convinced that Netscape should embed a programming language, in source form, in HTML. So it was hardly a case of me selling a “Pointy-haired boss” - more the reverse. Of course, by the time I joined Netscape, and then transferred out of the server group where I had been hired based on short-term requisition scarcity games, the Oak language had been renamed Java, and Netscape was negotiating with Sun to include it in Navigator. The big debate inside Netscape therefore became “Why two languages? why not just Java?” The answer was that two languages were required to serve the two mostly-disjoint audiences in the programming ziggurat who most deserved dedicated programming languages: the component authors, who wrote in C++ or Java; and the “Scripters”, amateur or pro, who would write code directly embedded in HTML. Whether any existing language could be used, instead of inventing a new one, was also not something I decided. The diktat from upper engineering management was that the language must “Look like Java”. From the beginning, Bill grokked the idea of an easy-to-use “Scripting language” as a companion to Java, analogous to VB’s relationship to C++ in Microsoft’s platform of the mid-nineties.

So you think you know C?

A lot of programmers claim they know C. Well, it has the most famous syntax, it has been there for 44 years, and it’s not cluttered with obscure features. I mean, it’s easy to claim that you know C. You probably learned it in college or on the go, you probably had some experience with it, you probably think that you know it through and through, because there’s not much to know. A B C D1 v2 v3 v4 v5 vYes, the right answer for every question in “I don’t know”. C itself does not define padding attributes, so the right answer is: “I don’t know”. So the right answer is: “I don’t know”. The fourth looks tricky, but it’s not that hard in retrospective, since you already know that int size is not directly specified in the standard. So once again “I don’t know” is the right answer.

I’ve written a survival guide for fellow junior developers, check it out

The switch from doing coding bootcamp projects to working on Xeneta’s full blown SaaS app with 7 other developers forced me up a pretty steep leaning curve, which I feared I wouldn’t manage to ascend, as reading source code of similar projects scared the shit out of me. If not, you’ll waste too much time banging you head against the wall. Take notesPeople are usually perfectly fine with helping others out, but you should avoid asking the same question multiple times. So whenever you get help, remember to write down the solution to next time you’re in the same situation. There are no stupid questions, but if you’ve asked the same question before, it’s a stupid one the second time you ask. Often times it’s just the terminology that’s foreign to you. Then use open time slots to learn more about the concepts.

Wind Waker Graphics Analysis

Although there are two variations of oceans in Wind Waker, I find this version to be the most memorable. So to recreate this, I’ve use some compound sine curves to displace the texture lookup, as seen above on the right. An added benefit of using sine curves for displacement, is that they animate so beautifully by simply throwing time into the equation. Now, simply combine several sine curves to compound them. 6x+8.94 / 4 Here, four sine curves have been used, each with a different scale and offset. To get started, I again used the compound sine curves technique to create the rising and falling of the waves, displacing the y value of the plane’s geometry. To replicate movement around the ocean without actually moving the plane, the texture lookup can be offset by a movement vector, making the texture slide across the surface.

Visual Studio for Mac - Introducing Visual Studio for Mac

None

An interesting story about self-taught Software Engineers: “Self-taught Software Engineers: Why Open Source is important to us”

Introduction to Open SourceAbout 13 years ago a friend introduced me to Open Source community. Why share for free the source code of my program, which I spend months developing? What if someone stole it? What if my “Competitors” use my source code to improve their products? I contributed and I improved an open source library and the open source community helped me to understand and correctly use collaborative tools like “Pull Request”. So for every open source project I am using, I am observing the source code. Thanks to open source we have access to some big projects like Mozilla Firefox for iOS or Wordpress for iOS. Being curious and observing projects like these will help you to evolve as Software Developer. Creating open source librariesAt some point I created a custom UIAlertView that I was using to my projects and I decided to make it open source. If you are active at Open Source community then you will be able to keep up with the best Software Developers or even better, to collaborate with them on a project.

How Riot Games manages docker containers in production

The answer to these three questions is that we need a scheduler - a service that operates at the cluster layer and executes our container strategy. The scheduler is a key component in maintaining the cluster, ensuring that containers are running in the right places, and restarting them when they die. We might want to launch a service such as Hextech Crafting, that needs six container instances to handle its load. The scheduler is responsible for finding hosts with enough memory and CPU resources to support these containers and doing whatever operations are needed to get those containers running. If one of those servers ever goes down, the scheduler is also responsible for finding a replacement host for the affected containers. They didn’t support container groups which we felt we’d need for bundling sidecar containers with many of our services. Admiral is written in Go and is compiled and packaged into a Docker container when run in a production datacenter. Moving forward, we’ll be transitioning work off Admiral and focusing on deploying DC/OS - which has become one of the leading open-source applications for scheduling container workloads.

Someone said learning Angular was “Excruciating”, so I put out a free course to make it less so.

In the world of frontend development, Angular 2 is perhaps one of the hottest topics. We’re proud to announce this 100% free course, containing both video and written content, on getting started with Angular 2. This course is perfect for those who have never touched AngularJS or Angular 2. The Angular-CLI method where you run a simply command to get your Angular 2 app up and running. We start dissecting how Angular 2 apps function at their most fundamental level. These are all of the core fundamentals that one must understand before beginning full Angular 2 apps. So if you’re ready to learn Angular 2 development today, let’s get started!

call for volunteers to port to modern openGL in Blender. “Who can help out? Anyone! Well anyone that can program in C. If you’re familiar with traditional OpenGL (glBegin, glVertex, glEnd) you’ve got a head start. Even if OpenGL is new to you the API is small and easy to learn.”

All Blender code that calls legacy OpenGL functions must transition to the new API before we can throw the big switch to enable core profile. Even if OpenGL is new to you the API is small and easy to learn. Here’s a small example of legacy OpenGL followed by the new API. We’ll be drawing a triangle that has one corner with color A and the other two corners color B, the colors blending smoothly across the triangle. The old API might or might not use shaders but the new API always does. In the new API, vertex attribute values can only be set between Begin and End, and affect the current vertex. The new API has no concept of “Current color”. 8 branch has the new drawing API; all work should happen there.

Is intuition in programming important to you?

I don’t realize it myself a lot of times, but I’ve come a long way in changing my mindset to handle the terminology of programming ideas and make them seem natural. Do you remember the day when you didn’t understand anything of programming terminology? Today, many people do not know what a “Segmentation fault” is or why their program is crashing. Do you remember how you first grasped these basic ideas of programming? Of course, Stack Overflow has a strict policy on repeating questions that have already been answered, and an unwritten, unspoken policy on downvoting really basic questions - which I quickly learned after the fact. Who is aiming to precisely teach “How to compress methods and ideas intuitively so that they can be reconstructed and utilized at will” for basic programming concepts? For searching and understanding basic programming terminology? If you remember the time that you searched “What is the best programming language?” on the Internet, you may remember that the best answer that was given was no answer at all.

A list of (almost) all headless web browsers in existence

Rb Headless Ruby browser on top of Nokogiri and TheRubyRacer Ruby Not specified Browserjet Headless webkit browser with node. Js, with all of the pain taken out! That means you get a real browser, with a real DOM, and can do real testing! JavaScript Not specified grope A non-GUI library to represent browser environment using WebKit Framework + RubyCocoa Ruby MIT Headless Headless browser support for fast web acceptance testing in. Net.NET MIT headless browser Headless browser based on WebKit written in C++. C++ Not Specified Headless Chromium Headless Chromium is a library for running Chromium in a headless/server environment. JavaScript, Java, Ruby, PHP Apache / Commercial Selenium Selenium is a suite of tools to automate web browsers across many platforms. JavaScript Mozilla 2.0 SpecterJS A scriptable headless Internet Explorer port of PhantomJS. JavaScript MIT Splash Splash is a javascript rendering service with an HTTP API. It’s a lightweight browser with an HTTP API, implemented in Python using Twisted and QT. Any BSD-3 Clause Splinter Splinter is an open source tool for testing web applications using Python. Python - stanislaw Python headless browser testing Python Not specified trifleJS A headless Internet Explorer browser using the. Ruby MIT Webloop Scriptable, headless WebKit with a Go API. Go BSD-3 Clause WKZombie Functional headless browser for iOS using WebKit and hpple/libxml2.

Cracking Videogame Passwords: Mike Tyson’s Punch-Out‼

None

OAuth 2.0 Hack Exposes 1 Billion Mobile Apps to Account Hijacking

Three Chinese University of Hong Kong researchers presented at Black Hat EU last week a paper called “Signing into One Billion Mobile LApp Accounts Effortlessly with OAuth 2.0.” The paper describes an attack that takes advantage of poor OAuth 2.0 implementations and puts more than one billion apps in jeopardy. The researchers examined 600 top U.S. and Chinese Android mobile apps that use OAuth 2.0 APIs from Facebook, Google and Sina-which operates Weibo in China-and support SSO for third-party apps. The researchers found that 41.2 percent of the apps they tested were vulnerable to their attack, including popular dating, travel, shopping, hotel booking, finance, chat, music and news apps. The researchers said the apps they tested had been downloaded more than 2.4 billion times in aggregate, meaning that more than one billion are vulnerable. “After signing into the victim’s vulnerable mobile app account using our exploit, the attacker will have, in many cases, full access to the victim’s sensitive and private information which is hosted by the backend server(s) of the vulnerable mobile app,” wrote researchers Ronghai Yang, Wing Cheong Lau, and Tianyu Liu. There’s a hitch there; the researchers learned that for backwards compatibility, Facebook identifies early adopters of a mobile app using the public user ID if a user has signed into the app via OAuth before May, 2014, they’re still exposed to the attack. Further, the researchers recommend identity providers issue private identifiers rather than relying on global identifiers, and identity providers should also ramp up security testing of apps to include SSO via protocols such as OAuth 2.0 and OpenID Connect.

A Regex that only matches itself.

In the first time 2 should match the empty string, and the second time 2. Q2. $E/z matches 15 characters from the end. So the pattern just before the second pattern must match the first 4 or 3 characters in the first pattern, so 2.2|2)2) must match …2) or …2. There cannot be a trailing newline because the last character should be ). And the matched text doesn’t contain another ) before the rightmost one, so all other characters must be in the 2. The first line makes the whole expression matches exactly 188 characters since everything has a fixed length. The two times of group 1 matches 45*2 characters plus 29 times 2. If quantifier is not allowed, it is impossible because nothing which can only match one string, can match a string longer than itself.

Why is machine learning ‘hard’?

There is no doubt the science of advancing machine learning algorithms through research is difficult. Machine learning remains a hard problem when implementing existing algorithms and models to work well for your new application. The difficulty is that machine learning is a fundamentally hard debugging problem. Debugging for machine learning happens in two cases: 1) your algorithm doesn’t work or 2) your algorithm doesn’t work well enough. Luckily for machine learning algorithms you also have more signals to figure out where things went wrong. The second compounding factor that complicates machine learning debugging is long debugging cycles. Machine learning developers will run multiple experiments because the bottleneck is often the training of the algorithm.

Help Rust make the most informed decisions on HKT by getting involved with the discussion as it happens. Use cases for HKT requested!

Somewhat recently I wanted to have an Iterator impl which forced the returned Item type to be dropped before the next one could be obtained. Yes, this is usually so that the iterator can “Generate” data as it goes, using some internal storage. I don’t think you could do it with the current Iterator trait even if we had ATC. And certainly not backward compatibly. It has some kind of subtle effects on people who want to write generic code over iterators. In particular, they can no longer assume that the data they produce will outlive the iterator. Now, one of the key things that the current iterator design supports is the ability to have one iterator trait supplying &T, &mut T, or T, as you need it, iter mut(), and into iter(. In that case, the above iterator could work, so in a sense this iterator trait is strictly more expressive.

How We Knew It Was Time to Leave the Cloud

What we found is that the cloud was not meant to provide the level of IOPS performance we needed to run an agressive system like CephFS. At a small scale, the cloud is cheaper and sufficient for many projects. It’s often sold as, “If you need to scale and add more machines, you can spawn them because the cloud is ‘infinite’". The nature of the cloud is time sharing so you still will not get the best performance. From a cost perspective, it is more economical and reliable because of how the culture of the cloud works and the level of performance we need. How we used our dashboard to understand CephFS in the cloud. Recap: What We Learned CephFS gives us more scalability and ostensibly performance but did not work well in the cloud on shared resources, despite tweaking and tuning it to try to make it work. There is a threshold of performance on the cloud and if you need more, you will have to pay a lot more, be punished with latencies, or leave the cloud.

DevFreeBooks

None

Announcing Rust 1.13

The Rust team is happy to announce the latest version of Rust, 1.13.0. Rust is a systems programming language focused on safety, speed, and concurrency. As always, you can install Rust 1.13.0 from the appropriate page on our website, and check out the detailed release notes for 1.13.0 on GitHub. We enjoyed three Rust conferences, RustConf, RustFest, and Rust Belt Rust, in short succession. Rust has gained a new operator, ?, that makes error handling more pleasant by reducing the visual noise involved. This sort of evolution is one of the great advantages of a powerful macro system: speculative extensions to the language syntax can be prototyped and iterated on without modifying the language itself, and in return, macros that turn out to be especially useful can indicate missing language features. This is a good example of the kinds of incremental, quality-of-life improvements Rust will continue to receive, polishing off the rough corners of our already-powerful base language.

I’ve had a lot of problems with imposter syndrome throughout my career. I finally wrote about.

There is still so much I don’t know, so much that I am uncertain of. Remember past successes and know that you had a role contributing to it. The beauty of our industry is that there is still so much we don’t really know. No one knows everything no matter how fanatic people can be in certain areas. We don’t know the troubles they face, what makes them really tick, what fears and weaknesses they battle out each day and what circumstantial history they have. Let’s give them a shout out based on my question “Anyone suffering from imposter syndrome lately? I’m writing a post. If you have any advice you wish to share let me know.” 75: 255-271.DOI: 10.5860/crl12-423.Techniques to deal with self-doubtTechniques to deal with uncertaintyCoping with Unknown Outcomes Corporate Programmer, Clarice Bouwer5 Ways to Let Go and Embrace an Uncertain Future Tiny Buddah, Lori Deschene7 Ways to Deal with Uncertainty So You Can Be Happier and Less Anxious Tiny Buddah, Lori DescheneComment on 5 Ways to Let Go and Embrace an Uncertain Future Disqus user drb74Cited “We are water. We evaporate, we freeze, we fall, we cool, we crash in waves, we ebb and flow, we soothe, swim and foam. A part of us looks the same to a mind that wants to condense and categorize, but in the end, we are constantly recreated anew.”

Atom 1.12 released

Atom 1.12 has shipped today with another helping of fixes and improvements. The new APIs turned out to be less important than we originally thought but we’re nonetheless happy to report Atom users in all locales now get typical keyboard behavior in Atom’s default installation. The scope specificity rules for keybindings were understandably confusing lots of Atom users. A new version of the Octicons is now bundled in Atom with improvements to line-weight and sizing normalization. Keystroke Resolver API. To help address the long tail of unusual international keyboard behaviors as interpreted by Chrome, particularly on Linux, Atom 1.13 includes a custom keystroke resolver API allowing users to assign Chrome keyboard events to Atom-style keystrokes. Get all these improvements today by joining the Atom Beta Channel! Join Us! Don’t see what you were hoping for here? Join the Atom team at GitHub.

Python for JavaScript Developers

To serve as a quick guide for JavaScript developers who want to get up to speed quickly with Python, but without having to learn what declaring a variable means or what a function is. Unlike JavaScript, variables in Python are always block scoped. Python is a bit more strict than JavaScript when it comes to syntax. Lists in Python are similar to arrays in JavaScript. Strings in Python are a lot like strings in JavaScript. A module in Python is simply a file that contains some Python code. Python has support for object oriented programming with classes and classical inheritance, unlike JavaScript which has prototypes with prototypal inheritance.

The XY problem is asking about your attempted solution rather than your actual problem.

The XY problem is asking about your attempted solution rather than your actual problem. User wants to do X. User doesn’t know how to do X, but thinks they can fumble their way to a solution if they can just manage to do Y. User doesn’t know how to do Y either. User asks for help with Y. Others try to help user with Y, but are confused because Y seems like a strange problem to want to solve. After much interaction and wasted time, it finally becomes clear that the user really wants help with X, and that Y wasn’t even a suitable solution for X. The problem occurs when people get stuck on what they believe is the solution and are unable step back and explain the issue in full. N00b doesn’t actually want the last 3 chracters in a filename, he wants the file extensions, so why ask for the last 3 characters? How can I echo the last three characters in a filename? If they’re in a variable: echo $ Why 3 characters? What do you REALLY want? Do you want the extension? Yes. Then ASK FOR WHAT YOU WANT! There’s no guarantee that every filename will have a three-letter extension, so blindly grabbing three characters does not solve the problem. Can iptables do this work?Obama: Well, don’t use OS detection or version scanningAngela: I want to prevent others from knowing the type of my OS..

Zeroing out my memory does cause them to page in faster after all

Not too long ago, I answered the question “If I zero out my memory pages, does that make them page in faster?” with “No.". Turns out that I was working from outdated information. My former colleague Adrian Oney confirms the information in the white paper shared by commenter John Doe, namely that starting in Windows Vista, the memory manager does check whether a page that is about to paged out consists entirely of zeroes. Then the memory manager turns the page into a demand-zero page rather than a page stored in the pagefile. Adrian said that he wrote the original prototype which confirmed that the extra check was worth it. “Some of this was due to apps dirtying their zero-init pages with inits to zero. Some of it was due to user mode zeroing pages for security reasons. But it was common enough to make it worthwhile.” I suspect that the increasing use of virtualization may contribute to this virtuous cycle as well.

Fixing CPU Frequency Scaling Issues in Android for Dropout-free Audio - Once and for All

This feature is directly proportional to the CPU load. If computing demand is high, the CPU runs at maximum frequency. If the CPU runs at a low frequency, the user application may not be able to produce the new buffer within time and then users experience “Audio dropouts”. This is a excruciating problem for developers of Android apps with pro audio requirements, where CPU scaling is quite aggressive. It’s highly audible when the audio application goes into the background and Android throttles the CPU back even more, thinking that the application doesn’t need the same amount of CPU for audio, when it was in the foreground. In case you were wondering, iOS also faces this problem too, but thanks to it’s better scheduling than Android, audio dropouts are only audible when the audio app computes the next audio chunk in more than 50% of the time represented by the buffer. This class implements a “True” sustained performance mode, where the CPU runs near the maximum frequency on all CPU cores. Every example project has been updated to use SuperpoweredCPU’s sustained performance mode, which provides a for CPU frequency scalcing for every Android device on every Android version.

comments powered by Disqus