Chrome, HTML5, JavaScript

Mobile Web App – Real Life Example

App scriptThis week in Google Developers Live Israel, we showed a live example of a mobile web app that is built in two ways. One we used jQueryMobile as our UI framework and for cases where we need to support IE we used bootstrap. All the code can be found on github. The nice aspect in this real demo is that we used google sheets are our ‘server side’ and since its got a cool way to publish their content to the web as RSS, ATOM, XML, JSON feeds we could work with them from the web/mobile apps. The three main elements we used are: Continue reading

Standard
Chrome, JavaScript, webdev

Install NodeJS On Compute Engine

NodeJS

In the past, I’ve showed how to run a NodeJS application in Compute Engine. It’s a good case where you wish to test ideas with App Script but when you move them to ‘production’ – NodeJS is the answer. After the Google Developer Live show we had at the end of August, I got few questions on how to install NodeJS inside Compute Engine instance.

Here are the (easy) steps I did before the show in order to save us time: Continue reading

Standard
Chrome, JavaScript, webdev

Debug NodeJS Like A Pro

NodeJS Debugging with Chrome

NodeJS Debugging with Chrome

Anyone who is building an application find out that, what is starting as ‘small project’, becoming very quickly bigger and bigger monster. You can use console.log on small projects but as they are growing you will need better tools. In the arena of “JavaScript on the server” there weren’t many tools to debug your code effectively. However, with the power of open-source projects like: Node, Blink and others there are few powerful ways to debug you code like a pro.

First, for the one that are a bit confuse about NodeJS. Well, it’s not a “JavaScript web server” but an environment to run JavaScript on the server. It is using V8 engine so the performances are very compelling. After using NodeJS inside Compute engine I got few questions about the debugging options. In the past, developers needed to use console.log and similar ‘printing’ commands in order to understand what is going under the hood of their script. But as we mention, when you get out of the area of 100 lines script and your application contain different modules and many more lines of code. You need a debugger (and hopefully other tools like profiler) in your hands. Luckily, we can use Chrome (=Blink) dev tools for your NodeJS applications.
Here are the main steps and the ways to leverage your new ‘hammer’. Continue reading

Standard
Chrome, JavaScript, webdev

Yahoo Finance API With NodeJS

nodejs logoIn the past I’ve wrote this post on the different options you can use with Yahoo Finance API. It is time (4 years later!) to a followup post on how to gain more data but this time with NodeJS.
The first idea was to be able to gain information by using different parameters and downloading csv files from Yahoo finance. Something like this GET request will do the magic:

http://finance.yahoo.com/d/quotes.csv?s=NFLX&f=snd1l1yr and from there you can work with the data.

However, there are cases, where you wish to have information that is not part of this set of arguments. Here are two quick examples for such cases: Continue reading

Standard
Chrome, HTML5, JavaScript

WebRTC Updates

webrtc logoIn this week show on Google Developers live Israel we hosted Sam Dutton in order to hear what’s new in the land of WebRTC. What? Well, Web Real-Time Communication (WebRTC) is a collection of standards, protocols, and JavaScript APIs that enables peer-to-peer audio, video, and data sharing between browsers. We covered (with demos) the three primary APIs:

  • MediaStream: acquisition of audio and video streams
  • RTCPeerConnection: communication of audio and video data
  • RTCDataChannel: communication of arbitrary application data

It was a fun 20min talk with some very impressive demos. Here are few demos that show the power of getUserMedia API: Continue reading

Standard
Chrome, HTML5, JavaScript, webdev

Install Ubuntu On Your Chromebook

chromebook 5

Chromebook For Developers And Hackers

If you are a Linux hacker and/or a developer with a new Chromebook, Chromebox, Pixel or an old laptop with ChromeOS… You might want to have the ability to have a dual-boot option that will let you enjoy the power of your ChromeOS but on the same time be able to boot your laptop with Linux and enjoy C, C++, Java and the fun technologies. It might be hard on other platforms to ‘hack’ them, but since the chromium project is open-source, I guess, they wanted to be hackable by design (e.g. you have a keyboard shortcuts in Pixel that let you enter this mode). Here are the few steps you need to follow in order to enjoy hacking ChromeOS. Continue reading

Standard
Chrome, HTML5, JavaScript

Chrome & Google Cloud Quick Update (GDL-IL)

Google APIsSome of the topic we touch during the show today:

Standard
Chrome, JavaScript

Monte Carlo Simulation On Compute Engine/App Script

App script on Ido's project place

This week in Google Developer Live Israel, we show you how to work with Google App script to run Monte Carlo simulations and get the results in an excellent informative way inside Google spreadsheets. We took it further and explained how to run these scripts on your instance machine inside Compute Engine with nodeJS.

This is a powerful option because the ability to ‘try’ quickly on App Script and then take the code to ‘production’ (=more efficient way) on Compute engine gives you more productivity.

So what are we doing?

First, let’s touch on the definition. This problem-solving technique approximates the probability of specific outcomes by running multiple trial runs, called simulations, using random input variables. The remarkable aspect is that we are steering the scenarios by using randomness.The randomness helps us ‘try’ each future strategy in a way that includes our probability per variable. This allows us to fine-tune our trial runs to answer a question with several variables. It will help us find the best way to spend time with our salesperson.

 Monte Carlo Simulations Steps

1. Define a model with a domain of possible inputs.

2. Generate input values randomly, sampling from a probability distribution over the domain.

3. Perform a deterministic computation on the inputs.

4. Aggregate the results. Continue reading

Standard
Chrome

Chromebook And Word/Excel Documents

Chromebook for enterpriseThere is a new feature in ChromeOS under Dev mode (Make sure its version is > 29). It will let you to edit office documents (Word, Excel) in your browser with QuickOffice. How to do it?

  1. Open a new tab (Ctrl+N).
  2. Type into the omnibox chrome://flags/ and hit Enter.
  3. Click on Ctrl+F and type “document”.
  4. Click “Enable” next to “Enable document editing”. This is what it should look like under the Flags page:chromeOS enable office editing

The good part in this new feature is that you can work on these documents in places where you don’t have any connection… and, if you need to take these docs from your google drive and ‘open’ them in google docs you will gain all the collaboration features. It’s important to remember that this feature is under dev mode for now. So use it like any other feature that is ‘canary’.

Standard
Chrome, HTML5, JavaScript, webdev

HTML5 APIs To Use Today On Google Developers Live Israel

Last week, I meet with few startups to talk about their web apps. After few basic questions like: how do I save data on the client without cookies? or something like: “Can I get a video input from the browser?” I thought it might be a good idea to touch on some of the APIs that are out there today in most browsers and developers can use. The best part is that in most cases, you can start using these APIs with very little code. In this demo page  you can hack around some basic HTML5 features and see the code snippets that will let you do some cool things like: save information locally (local storage for the rescue here), Geo location, device orientration, Getting Video/Audio (with WebRTC), Visibility API etc’.

The slides from my #DevConTLV Talk

Standard