 Your new post is loading...
|
Scooped by
nrip
|
When Google unveiled Android, it hoped it would make good quality, touchscreen smartphones accessible to everyone. To achieve this, it took the unprecedented step of making its new mobile OS open source, encouraging anyone to contribute - users and manufacturers alike
|
Scooped by
nrip
|
One of the hurdles that new Python developers have to get over is understanding the Python packaging ecosystem. This blog post is based on material covered in our Python for Programmers training course, which attempts to explain pip and virtualenv for new Python users. pip Let's dive in. pip is a tool for installing Python packages from the Python Package Index. PyPI (which you'll occasionally see referred to as The Cheeseshop) is a repository for open-source third-party Python packages. It's similar to RubyGems in the Ruby world, PHP's Packagist, CPAN for Perl, and NPM for Node.js. Python actually has another, more primitive, package manager calledeasy_install, which is installed automatically when you install Python itself. pip is vastly superior to easy_install for lots of reasons, and so should generally be used instead.
|
Scooped by
nrip
|
Git is being widely adopted in companies for its ability to drive agility and innovation for leading-edge mobile, social and cloud-based applications. More Than 40 Percent Use Git Originally created by Linux creator Linus Torvalds, Git is a free and open source distributed version control system “designed to handle everything from small to very large projects with speed and efficiency,” in theproject's own words. Not only that, but it's fast and easy to learn, and it offers a diminutive footprint. Written in C, Git was built to work on the Linux kernel and was designed with speed and performance in mind. Today, all the many advantages that have long made the system appealing to independent developers are apparently attracting enterprises as well. This April marks both the eighth anniversary of Git and the fifth anniversary of GitHub, so it should come as no great surprise that the distributed revision control and source code management (SCM) system has been the focus of extra attention this month. Case in point: Enterprise cloud development firm CollabNet recently announced the results of what it calls the first major industry survey on Git adoption in the enterprise. In a nutshell, the survey found that Git is being widely adopted in companies for its ability to drive agility and innovation for leading-edge mobile, social and cloud-based applications.
|
Scooped by
nrip
|
Windows Azure Web Sites provide a nice selection of ways to deploy a site from source code. You can deploy from: a local git repositorya TFS projecta git project on GitHuba git or Mercurial project on Bitbucketa git or Mercurial project on CodePlexcode in a Dropbox folder One thing that all these approaches have in common is that you own the code. e.g. in the GitHub case, you must be an admin on the project. The reason is that Azure needs to set up a hook in the project to enable continuous deployment, and only project owners can do that.
|
Scooped by
nrip
|
When you run a normal Python program, the program execution starts at the first line and goes down line by line. Loops and function calls may cause the program execution to jump around, but it is fairly easy to see from the code which line will get executed next at any given point. You can put your finger on the first line of code in the .py file on the screen, and then trace through the next lines of code that are executed. This is single-threaded programming. However, using multiple threads is like putting a second finger down on your code. Each finger still moves the same way, but now they are executing code simultaneously. Actually, they aren’t executing simultaneously. Your two fingers are taking turns at which one executes code. Computers with multicore CPUs can actually run multiple instructions simultaneously, but there is a feature of Python programs called the GIL (Global Interpreter Lock) that limits a Python program to one core only. The Python interpreter will run one thread for a while, and then pause it to run another thread for a while. But it does this so fast that it seems like they are running simultaneously. You can start dozens or hundreds of threads in your program (that’s a lot of fingers). This doesn’t automatically make your programs dozens or hundreds of times faster though (all the threads are still sharing the same CPU) but it can make your program more efficient. For example, say you write a function that will download a file full of names, then sorts the names, and then writes these names to a file on your computer. If there are hundreds of files your program needs to process, you would put a call to this function in a loop and it would handle each file serially: download, sort, write, download, sort, write, download, sort, write… Each of these three steps use different resources on your computer: downloading uses the network connection, sorting uses the CPU, writing the file uses the hard drive. Also, there are tiny pauses within each of these steps. For example, the server you are downloading the file from may be slow and your computer’s Internet connection has bandwidth to spare. It would be better if you could call this function hundreds of times in parallel by using one thread for each file. Not only would this make better use of your bandwidth, but if some files download sooner than others, the CPU can be used to sort them while the network connection continues to work. This makes more efficient use of your computer. What makes multithreaded programming tricky? Of course, in the above case, each thread is doing its own separate thing and doesn’t need to communicate or synchronize anything with the other threads. You could just write the simple single-threaded version of the download-sort-write program and run the program hundreds of times separately. (Though it might be a pain to type & click each time to run the program each with a different file to download.) Many multithreaded programs share access to the same variables, but this is where things can get tricky.
|
Scooped by
nrip
|
Reflection is generally defined as a program’s ability to inspect itself and modify its logic at execution time. In less technical terms, reflection is asking an object to tell you about its properties and methods, and altering those members (even private ones). In this lesson, we’ll dig into how this is accomplished, and when it might prove useful. At the dawn of the age of programming, there was the assembly language. A program written in assembly resides on physical registers inside the computer. Its composition, methods and values could be inspected at any time by reading the registers. Even more, you could alter the program while it was running by simply modifying those registers. It required some intimate knowledge about the running program, but it was inherently reflective. As higher-level programming languages (like C) came along, this reflectivity faded and disappeared. It was later re-introduced with object-oriented programming. Today, most programming languages can use reflection. Statically typed languages, such as Java, have little to no problems with reflection. What I find interesting, however, is that any dynamically-typed language (like PHP or Ruby) is heavily based on reflection. Without the concept of reflection, duck-typing would most likely be impossible to implement. When you send one object to another (a parameter, for example), the receiving object has no way of knowing the structure and type of that object. All it can do is use reflection to identify the methods that can and cannot be called on the received object.
|
Scooped by
nrip
|
What is Intel up to? It has just released a set of really good HLML5 tools, potentially the best yet, that allows you to create apps that are platform independent. This raises more questions that it answers. Why is an "Intel Inside" sticker on HTML5 so important? If you are creating or thinking of creating a Web app using JavaScript then you need to know about what Intel is up to. Its latest offering makes it possible, and in fact easy, to create a web app that will work on mobile and desktop devices and then package it for all of the app stores you want to support. If this is as good as it seems to be, it is a winning tool and a way to really make apps that are write once and run everywhere. Intel took the opportunity of launching its revamped developer offering for HTML5 apps at the Intel Developer Forum in Beijing in April. The aim is very high as you can tell from the title of arecent blog post - "One Code Base to Rule Them All". You might think that this is a null claim as HTML5 is standardized, but this is to miss the point that an HTML app running on different platforms has a very different runtime environment. The APIs available in a desktop browser aren't the same as those in an Android Phone and there are even differences between a Chrome and a Firefox packaged app.
|
Scooped by
nrip
|
Google's WebP image format promises smaller images and in turn faster web pages, but so far only a few web browsers support it. That would change though if Firefox jumps on the WebP bandwagon. Want your website to load faster? Slim your images. According to the HTTPArchive, images account for roughly 60 percent of total page size. That means the single biggest thing most sites can do to slim down is to shrink their images. We recently covered how you can cut down your website’s page load times using Google’s image-shrinking WebP format. Unfortunately, one of the downsides to WebP is that only Opera and Chrome support it. But that may be about to change — Firefox is reconsidering its decision to reject WebP. The change of heart makes sense since most of the objections Firefox developers initially raised about WebP have since been addressed. However, Firefox hasn’t committed to WebP just yet. As Firefox developer Jeff Muizelaar writes on the re-opened bug report, “just to be clear, no decision on adopting WebP has been made. The only thing that has changed is that we’ve just received some more interest from large non-Google web properties which we never really had before.” Whatever the case, if Firefox does land support for WebP it would help the fledgling format cross the line where more browsers support it than don’t, which tends to be the threshold for wider adoption. If you’d like to experiment with WebP today, while still providing fallbacks for browsers that don’t support it, be sure to check out our earlier write-up.
|
Scooped by
nrip
|
|
Scooped by
nrip
|
When writing a large JavaScript application, it is quite often that console.log and other debugging statements are sprinkled here and there. Obviously, at one point those extraneous statements need to be removed for the production version or even when the code needs to be checked in into the source repository. There are many different ways to do this, there exists a new tool calledgroundskeeper which can do this removal for you. Written for Node.js, groundskeeper (GitHub: github.com/Couto/groundskeeper) is created by Luís Couto to handle logging removal by understanding the syntax tree of the code and deleting the relevant parts. It is not based on regular expression at all. Groundskeeper parses the code (viaEsprima) and modify the syntax nodes (via falafel) associated with any logging. Beside a command-line tool, groundskeeper is also a library ready to be used in any other tools and build systems. Using groundskeeper is terribly simple (as its documentation explained). Let’s assume we have the following filter-debug.js:
|
Scooped by
nrip
|
SourceTree is a free Git desktop client for developers on Windows. Say goodbye to the command line and use the full capabilities of Git through SourceTree’s beautifully simple interface (and stop being jealous of what your Mac friends are using).
|
Scooped by
nrip
|
Without orientation, deployments of Python applications can be tiresome and even painful. This talk attempts to replace anxiety and pain through informed annoyance.
|
Scooped by
nrip
|
When Google launched its EC2 rival, Google Compute Engine, last June, it set some high expectations. Sebastian Standil’s team at Scalr put the cloud infrastructure service through its paces — and were pleasantly surprised at what they found.
|
|
Scooped by
nrip
|
WebRTC is a proposed standard — currently being refined by the W3C — with the goal of providing a web-based set of tools that any device can use to share audio, video and data in real time. It’s still in the early stages, but WebRTC has the potential to supplant Skype, Flash and many native apps with web-based alternatives that work on any device. It’s still going to be some time before WebRTC technology starts to deliver cool apps, but even today developers are quickly moving from the realm of cool WebRTC experiments, like the Mozilla/Google phone call demo, to useful apps like Codassium.
|
Scooped by
nrip
|
Windows 8 introduced a new type of application set named “Windows 8 Store app” which has a new look & feel (earlier named as “Metro UI”). Developers can host & sell these WinRT apps from Windows Store, a new digital platform from Microsoft. Windows Store will allow both free and paid applications where the ranges may vary from $1.49 to $999.99 in case of paid version.
If you are a Visual C#, Visual Basic, Visual C++ and/or JavaScript application developer, you can build applications for Windows 8 Store using any one of those languages. I have started building a Tutorial series on WinRT (Windows 8 Store) application development using Visual C#, XAML templates.
Based on readers feedback, I built this page listing all the chapters of this tutorial series and will continue updating this page with the coming chapters of the tutorial. Start learning this new technology and build applications for Windows Store.
|
Scooped by
nrip
|
Chrome’s experimental Canary channel and Safari’s WebKit nightly builds both now support all of the Photoshop-inspired blend modes for CSS Shaders, part of Adobe’s effort to bring Photoshop-style filter tools to the web. To see the new blend modes in action, grab a copy of the latest Chrome Canary or WebKit nightly builds, enable the CSS Shaders option in about:flags and point your browser to Adobe’s sample code over on Codepen. Previously, CSS Shaders required a special build of WebKit [Update: As Adobe's Alan Greenblatt points out in the comments, CSS shader support has been in Chrome stable since v25 (you still need to enable the flag). But if you want to play around with these new blend modes then you'll need Canary (or a WebKit nightly).] The new blend mode support is part of Adobe’s CSS Shaders proposal, which recently became part of the W3C’s CSS Filter Effects specification. There are two types of shaders in the spec, CSS fragment shaders, which provide features similar to what Photoshop’s blending modes offer, and CSS vertex shaders, which handle the 3D animation filters we’ve showcased in the past. The blending modes currently available include all the familiar options you’ll find in Adobe Photoshop, such as multiply, screen, overlay, luminosity and other photographer favorites. For more details and links to the corresponding specs, be sure to check out this post from Max Vujovic, who is working on the CSS Filters implementation in WebKit and Blink.
|
Scooped by
nrip
|
The popular jQuery JavaScript library has hit a major milestone with the release of jQuery 2.0. The 2.0 release is some 12 percent smaller than its predecessor, but the big news is that jQuery 2.0 drops support for Internet Explorer 6, 7 and 8. Created to simplify the process of writing JavaScript and manipulating HTML, jQuery began life a mere seven years ago, but quickly found favor with developers sick of dealing with cross-browser JavaScript hassles. According to onesurvey published last year, jQuery turns up on roughly half of all sites on the web. Will dropping support for older versions of IE change that? Probably not. If your site needs to maintain support for IE 8 and below (or even IE 9 and 10 running in compatibility mode) you’ll just need to stick with jQuery 1.9 or below. “jQuery 2.0 is intended for the modern web,” writes jQuery’s Dave Methvin on the Query Foundation website. “We’ve got jQuery 1.x to handle older browsers and fully expect to support it for several more years.” If you want the best of both worlds you can use a conditional comment to serve 2.0 to newer browsers and 1.9 to older ones, but the far easier way to go is sticking with jQuery 1.x. For now at least the primary use case for the 2.0 line is situations where IE support isn’t a consideration — think Chrome or Firefox add-ons, PhoneGap apps or node.js.
|
Scooped by
nrip
|
A probabilistic programming language is a high-level language that makes it easy for a developer to define probability models and then “solve” these models automatically. These languages incorporate random events as primitives and their runtime environment handles inference. Now, it is a matter of programming that enables a clean separation between modeling and inference. This can vastly reduce the time and effort associated with implementing new models and understanding data. Just as high-level programming languages transformed developer productivity by abstracting away the details of the processor and memory architecture, probabilistic languages promise to free the developer from the complexities of high-performance probabilistic inference.
|
Scooped by
nrip
|
The first release of Firefox with support for WebRTC is right around the corner and Mozilla is encouraging web developers to go ahead and start experimenting with what Mozilla refers to as “the real future of communications.” WebRTC is a proposed standard — currently being refined by the W3C — with the goal of providing a web-based set of tools that any device can use to share audio, video and data in real time. It’s still in the early stages, but WebRTC has the potential to supplant Skype, Flash and many device-native apps with web-based alternatives that work in your browser. WebRTC support is already baked into Firefox for Android. Both the getUserMedia API and the PeerConnection API — key components of WebRTC and the cornerstones of web-based voice chat — are already supported though you’ll need to enable them in the preferences. See theMozilla hacks blog for more details.
|
Scooped by
nrip
|
There are benefits to rooting your Android smartphone, but it can be a tricky world for beginners. Here are some tips. For all of the flexibility and customization that comes with an Android device, there are still plenty of restrictions in place. While Android technically is an open-source platform, the final product is still the result of a phone maker's skin, the carrier or manufacturer's preloaded software, or even sometimes, a few disabled features. There isn't anything wrong with most out-of-the-box experiences, but more daring and tech-savvy users who tire of being at the mercy and discretion of carriers and handset makers might be interested in pushing theirAndroid devices to new limits. This where the practice known as rooting comes into play. What is rooting?Rooting, in a nutshell, is the process that provides users with full administrator control and access to an Android smartphone or tablet. Similar to "jailbreaking" an iOS device, this is often done in order to bypass carrier or handset maker limitations or restrictions. Once you achieve "root access," you can replace or alter applications and system settings, run specialized apps, and more. One of the more common reasons to root a phone is to replace the operating system with a ROM, another developer's version of the OS that also gives you more control over details. In rooting culture, we'd call that "flashing a custom ROM." The process of rooting an Android phone varies for each device, but seems to have been streamlined over time. Google's Nexus line of phones, such as the LG-made Nexus 4, appeals to developers and techie types and are among the most often rooted models. With that in mind, you'll also find that popular devices like the Samsung Galaxy S3 and HTC One X+ have plenty of custom ROMs to choose from. Note that rooting will void the device warranty; however, flashing a stock ROM can revert things back to their original state.
|
Scooped by
nrip
|
TinyWebDB is an App Inventor component that allows you to access the web from an Android app. You can use TinyWebDB to access a data source (API) or to store the app’s data persistently in a web database. These notes show you how to do the latter– set up a web database, and set it up in the cloud using Google’s free App Engine service. With the sample code provided here, you can set up a web database that lives on Google’s servers in just minutes, and you need not be a programmer to do so. Note that App Inventor also provides a TinyDB component. TinyDB stores data directly on the phone and is simpler to use. TinyWebDB is required only if data needs to be shared between phones and apps (e.g., social apps, multi-player games). By default, the TinyWebDB component stores data on a test service provided by App Inventor, http://appinvtinywebdb.appspot.com/. This service is helpful for testing, but it is shared by all App Inventor users, and it has a limit of 1000 entries. If you use it, your data will be overwritten eventually. For anything other than tests, you’ll want to create a custom web service that isn’t shared with other App Inventor apps and programmers. You need not be a programmer to do so– just follow the instructions below and you’ll have your own service within minutes.
|
Scooped by
nrip
|
This post will take a look at our REST API by creating a Python script to interact with the entity endpoint. One of the key benefits of using standard technologies, formats, and protocols is the incredible amount of existing tooling that you get for free. Since we’ve been busy building our new service, backed by our ever changing database, we haven’t gotten around to client libraries yet. However, we do speak JSON through REST over HTTPS. Every language already has battle hardened libraries for working with those. For Python, it doesn’t get much better than the requests library. Their motto is HTTP for Humans and it makes working with RESTful services a breeze.
|
Scooped by
nrip
|
When we started with Source Code Management (SCM) – at the time – we still had a virtual Windows server running with QualityHosting.de. So a friend set up VisualSVN for us on this box. This got us started with Subversion. A few years later I got started with git. Then I got into it a bit more with git submodules. Those were the beginnings of a beautiful friendship. Two years later we decided that was enough of procrastrinating. Finally the time had come to switch to git for good. Subversion served us well, because – seriously – it had several attributes that I chose to interpret as advantages. Specifically for my components I wanted to have a central place that I am controlling acces
|
Scooped by
nrip
|
Having grown up with a parent who is a web designer and a software engineer, gave me an early look at programming languages such as Python, Ruby, C++ and Java. Unfortunately I was never really inte...
|
Scooped by
nrip
|
Defines descriptors, summarizes the protocol, and shows how descriptors are called. Examines a custom descriptor and several built-in python descriptors including functions, properties, static methods, and class methods. Shows how each works by giving a pure Python equivalent and a sample application. Learning about descriptors not only provides access to a larger toolset, it creates a deeper understanding of how Python works and an appreciation for the elegance of its design.
|
Scooped by
nrip
|
Install Git To install Git under Ubuntu, it is as easy as running the following command: sudo apt-get install git-core To confirm whether it has been successfully installed, run the command below. This should return the path where git is located. which git To determine which version of git is installed: git --version Configuring Git Git configuration is stored in three different locations which is based on the three levels of configuration. System Level configuration which will be applied to every user of the system. This is stored in the/etc/gitconfig or Program Files\Git\etc\gitconfig for Windows.User Level configuration which will apply to only a single user. The path for this level is~/.gitconfig or $HOME\.gitconfig for Windows.Project Level and this will be inside the project folder like my_project/.git/config and this will be only for that project. All these files can be directly edited but we must be sure about their format and syntax. Any mistake can make big problems. Luckily we don’t have to edit them directly, Git comes with commands that will make the changes for us.
|