Sign Up Now!

Sign up and get personalized intelligence briefing delivered daily.

Sign Up

Articles related to "code"

TypeScript’s Quiet, Steady Rise Among Programming Languages

  • Microsoft's programming language TypeScript has quietly become one of the most popular languages among developers, at least according to a report published by the analyst firm RedMonk this week.
  • Microsoft unveiled TypeScript in 2012, and while it hasn't grown as quickly as Swift—which has grown faster than any other language since RedMonk started compiling the rankings in 2011—Typescript’s own ascendence is impressive, given the sheer number of available programming languages.
  • But RedMonk doesn't look at how many jobs are available for people skilled in a particular language, nor how many companies actually use the language.
  • After a decade marked by the introduction of new programming languages like Google's Go and Mozilla's Rust, along with renewed interest in older languages like Erlang and Haskell, it looked like things were settling into a new status quo when RedMonk released its previous rankings last August.

save | comments | report | share on GFX: Native graphics development in the browser

  • And today, we're excited to bring native GUI applications and game development to the browser.
  • We want programmers from all backgrounds, regardless of their language, to be able to code games and apps with ease.
  • Plus, supporting native graphics opens us up to a wealth of frameworks, games, and educational material!
  • Right now, we're piping the X Window system through VNC through WebSockets to your browser, which is not the most efficient way to do this — we have a lot of ideas on how we could improve it.
  • Finally, depending on how far you are from our data center (US-central) you might feel a delay, which we're also working on making better by replicating our data center (watch out Google Stadia).
  • We're supporting these frameworks out of the box, but very soon, we'll roll this out to all of our languages.

save | comments | report | share on

How I Built a Drum Machine in React, Part One: Basic Architecture and Style

  • Note: This article contains a partial potential solution for the freeCodeCamp Drum Machine project, so please avoid this for now if you're actively working on that project and don't wish to be spoiled!
  • Additionally, detailing my work process will be helpful to me (and you, I hope!), so I'm picking up where I left off with the Drum Machine project.
  • App loads, and the display component shows a default message that is stored in state.
  • An array containing the button names, to be mapped over later in the component.
  • Here we have the child components being fed their respective props from the App component, and the dynamic generation of the buttons from mapping over the data array and feeding in the name.
  • Style: I'm not going to do more that make these apps vaguely pleasant to look at for now, as I want to concentrate on the core skills of these challenges.

save | comments | report | share on

Should I write a library?

  • It might be pure coincidence because of similar (but actually unrelated) business requirements in Service A and B.
  • Business requirements are likely to change in a unforseen and incompatible way.
  • On the other hand, if you have code that serves purely technical purposes like managing database connections, logging, serving REST endpoints and the alike, it can be really worthwhile considdering to refactor these stuff into a reusable library.
  • If you extracted parts of your code base into a library, you have to plan for upcoming changes and how you want to handle them.
  • If you have no way of informing clients for classes and methods that are no longer to be used, you will either end up maintaining this code for the lifetime of this library or you remove it without announcing and hit your clients unprepared when they migrate to the next version.

save | comments | report | share on

Save 40% on couches, chairs, and coffee tables at Target — and more of today's best deals from around the web

  • For more deals and savings at Target, visit Business Insider Coupons here.
  • Today, as an Amazon deal of the day, you can save 50% on select AeroGarden indoor gardens including the larger AeroGarden Ultra or the compact AeroGarden Harvest 360.
  • For more deals and promotions at Ralph Lauren, visit Business Insider Coupons.
  • For a limited time, you can save 20% on select watches for men and women including the sale section by using the promo code "VIP20" at checkout.
  • Find more great deals and promotions at Nordstrom Rack by visiting Business Insider Coupons.
  • For more deals and promotions at Sears, visit Business Insider Coupons here.
  • During the brand's spring flash sale, you can save $125 on the Luxe Mattress with the promo code "LUXE125" and $75 on the Helix Mattress with the promo code "SPRINGFLASH75" at checkout.

save | comments | report | share on

Tech deals: save on GoPro’s Hero 7 Silver camera, the new ‘Duke’ Xbox controller, and more

  • Only the best deals on Verge-approved gadgets get the Good Deals stamp of approval, so if you're looking for a deal on your next gadget or gift from major retailers like Amazon, Walmart, Best Buy, Target, and more, this is the place to be.
  • GoPro’s Hero 7 Silver action camera is $199 at Amazon, which is $100 off of its original price and cheaper than ever, according to pricing data from CamelCamelCamel.
  • Usually $89.99, it’s $47.99 at Amazon and Walmart.
  • Amazon is highlighting its discount on the Bose Home Speaker 500 smart speaker.
  • Usually $399, it’s currently $349, and can play music through services like Spotify and Amazon Music.
  • It’s cheaper now since the release of a new version that’s faster and more capable, though there is supposedly no difference in sound performance compared to the now-last-gen model.

save | comments | report | share on

Hardware Debugging with JTAG on a Raspberry Pi

  • Via raspboot, we load a tiny helper binary onto the RPi which configures the pins respectively and then parks the executing core in an endless loop, waiting for the JTAG debugger to connect.
  • The helper binary is maintained separately in this repository's X1_JTAG_boot folder, and is a stripped-down version of the code we use in our tutorials.
  • Next, we need to launch the Open On-Chip Debugger, aka OpenOCD to actually connect the JTAG.
  • OpenOCD has detected the four cores of the RPi, and opened four network ports to which gdb can now connect to debug the respective core.
  • It also launches gdb such that it already loads this debug build (kernel8_for_jtag).
  • When debugging an OS binary, you have to make a trade-off between the granularity at which you can step through your Rust source-code and the optimization level of the generated binary.

save | comments | report | share on

A Pwn2Own Exploit Chain

  • We compile the code for the case of a JSArray with unboxed double elements, then, in the callback, transition to JSValue elements.
  • The following code will write the unboxed double address into the backing buffer of a which we can then read out as JSValue, allowing us to "inject" JSValues of our choosing into the engine.
  • A security issue now arises if the child process is more privileged than the parent, as is the case for example with sudo (a setuid binary) or kextutil (having the "" entitlement").
  • By overwriting the bootstrap port and forking a child processes, we can now gain a MitM position between our child and launchd (which our child expects to reach when sending messages to the bootstrap port).
  • By resolving these services to other ports controlled by us, we can also gain a MitM position with arbitrary system services used by our child process.

save | comments | report | share on

Using The Chrome Developer Tools

  • The Elements tab will show you all of the HTML for the page where you have opened the developer tools.
  • Most of the time you'll probably have the console down at the bottom of your developer tools so this tab isn't the most crucial thing in the world.
  • In the Sources tab you can see, edit, and add breakpoints to the code files that have been loaded for the page.
  • If you're page keeps timing out and you've already looked through some of the other possible issues, try this tab.
  • This is another one of those tabs that you probably won't use much, but it's super powerful in certain situations if you know what to do with it.
  • Some of you probably know that there are three other tabs in the Chrome dev tools: Audits, Memory, and Security.

save | comments | report | share on

Using `Hash#fetch` in Ruby for better nil handling

  • Let’s look at an example of a classifieds site that sorts its listings when displaying them for the user, and some of the ways we can use Hash#fetch to proactively handle those nils before they happen.
  • There’s many ways to handle this problem, for example, we could set a default with the || operator.
  • With Hash#fetch, if a key is not found in a hash, we can provide a default key to look for, which is quite a nice way to handle our nil situation.
  • Semantics alone aren’t a great reason to use this pattern though, so lets look at some more interesting examples where Hash#fetch can be used to proactively handle nils.
  • In the case where you don’t find what you’re looking for in a hash, returning a default value is nice, as we’ve seen.

save | comments | report | share on