Code it
Follow
3.0K views | +0 today
Code it
This is a curated resource for programmers and software architects. It is regularly updated with Articles, Hacks, How Tos, Examples and Code.
Curated by nrip
Your new post is loading...
Your new post is loading...
Scooped by nrip
Scoop.it!

GET RESTful With Python

GET RESTful With Python | Code it | Scoop.it

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.

more...
No comment yet.
Scooped by nrip
Scoop.it!

Moving from SVN to GIT

Moving from SVN to GIT | Code it | Scoop.it

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

more...
No comment yet.
Scooped by nrip
Scoop.it!

Python: a time saver?

Python: a time saver? | Code it | Scoop.it
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...
more...
No comment yet.
Scooped by nrip
Scoop.it!

How-To Guide for Descriptors

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.

  
more...
No comment yet.
Scooped by nrip
Scoop.it!

Setting Up Git

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.

 
more...
No comment yet.
Scooped by nrip
Scoop.it!

Teachers Are the Key to Everyone Learning to Code

Teachers Are the Key to Everyone Learning to Code | Code it | Scoop.it
Efforts like the recently launched Code.org try to make programming more appealing to students -- an admirable goal -- but if we're serious about expanding computer science in schools we need to start talking to teachers.
more...
No comment yet.
Scooped by nrip
Scoop.it!

Serving Python Web Applications With Apache

Python is a great language that is useful for many things, among them creating web applications. There is a plethora of great web frameworks out there, and Python makes it nice and easy to do such things as parsing json or talking over HTTP out of the box.

If you don’t need anyting fancy, Python even makes starting a simple HTTP server a one-liner from the command line:

$ python -m SimpleHTTPServer Serving HTTP on 0.0.0.0 port 8000 ...

Once you need to set up a production environment, however, you will generally require something more robust to serve your application than this, or any of the development servers included with your favorite web framework. In this blogpost I’ll explain how to set up an Apache HTTP Server to serve Python web applications.

 
more...
No comment yet.
Scooped by nrip
Scoop.it!

10 C Language Tips for Hardware Engineers

10 C Language Tips for Hardware Engineers | Code it | Scoop.it

On its own, the software development process has numerous hazards and obstacles that require navigation in order to successfully launch a product. The last thing that any engineer wants is challenges resulting from the language or tool that is being used. It often makes sense or is necessary for the hardware designer to write code to test that the hardware is working or in resource constrained cases, develop both hardware and embedded software.


The language of choice is still C and despite the advances in tools and structured programming, time and again basic mistakes occur that lead to bugs and maintenance nightmares. In an attempt to avoid these C programming pitfalls, here are 10 C language tips for hardware engineers. 

more...
No comment yet.
Scooped by nrip
Scoop.it!

Use Git 0.8.0.0 to run scheduled builds and resolve conflicts -

Use Git 0.8.0.0 to run scheduled builds and resolve conflicts - | Code it | Scoop.it

Visual Studio Tools for Git 0.8.0.0. Install this release to get not only fixes to numerous bugs, (for details see the release notes on the gallery page), but also an enhanced conflict resolution experience.

more...
No comment yet.
Scooped by nrip
Scoop.it!

Jelastic Launches Version 1.9 of Java and PHP Cloud Platform

Jelastic Launches Version 1.9 of Java and PHP Cloud Platform | Code it | Scoop.it
Jelastic Launches Version 1.9 of Java and PHP Cloud Platform. Cloud hosting provider Jelastic announced on Tuesday it has launched version 1.9 of its Java and PHP cloud hosting platform, following US web hosting partner...
more...
No comment yet.
Scooped by nrip
Scoop.it!

PHP Troubleshooting in Windows Azure Web Sites

PHP Troubleshooting in Windows Azure Web Sites | Code it | Scoop.it

The need to diagnose and troubleshoot application’s failures often comes up during deployment to a hosting environment. Some configuration settings in hosting server may differ from what application expects. Often it is not as easy to figure out the cause of the problem in a hosting environment as it is on a development machine.  I found the following techniques useful when troubleshooting errors in PHP applications hosted in Windows Azure Web Sites.

 
more...
No comment yet.
Scooped by nrip
Scoop.it!

How To Build a Browser Application:

What are the essential components of a browser (web) application?

The essential feature of a web/browser application is not the actual application, but rather managing the links between the client, server and database/data files. To write the application is usually straight forward - its linear, sequential and easily visualized. Access management (link management) - i.e. managing the communication between the client and server, because communication is asynchronous and discontinuous (i.e. the client is not continuously connected to the server) is difficult. Below we identify the essential components of link management, and describe local tools we have crafted to make access management easy.

 

Access (Link) Management

 

Authentication: to determine if the user is valid
Access control: to determine if the valid user can have access to resources
Session management: to limit the dead time an app is accessible via a secure path.


Web apps are a sequence of connect-disconnect transactions between the client and server and some sort of session managment is necessary so that an access to a secure app that remains open for browser access (for example, the phone rings and you don't return to the app for half an hour), or a browser that is not closed at the end of a session has limited "rights" to continue a session.

 

Logging (to track user and access to secure resources)

more...
No comment yet.
Scooped by nrip
Scoop.it!

Automagic Removal of JavaScript Logging

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:

 
more...
No comment yet.
Scooped by nrip
Scoop.it!

Introducing SourceTree for Windows – a free desktop client for Git

Introducing SourceTree for Windows – a free desktop client for Git | Code it | Scoop.it

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).

 

 

more...
No comment yet.
Scooped by nrip
Scoop.it!

Solid Python Deployments for Everybody

Solid Python Deployments for Everybody | Code it | Scoop.it

Without orientation, deployments of Python applications can be tiresome and even painful. This talk attempts to replace anxiety and pain through informed annoyance.

more...
No comment yet.
Scooped by nrip
Scoop.it!

By the numbers: How Google Compute Engine stacks up to Amazon EC2

By the numbers: How Google Compute Engine stacks up to Amazon EC2 | Code it | Scoop.it
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.
more...
No comment yet.
Scooped by nrip
Scoop.it!

Git is a purely functional data structure

While decentralized version control like Git has a lot of momentum
right now, they still seems to have a reputation of being more complex
than their centralized siblings, like SVN. I'm guessing one reason for
this is that we tend to explain Git by comparision: When you'd do X
in SVN, you'd do Y in Git.

 

I think we should instead talk about Git in terms of what it really
is: A purely functional data structure. Learning to expertly use Git
means learning how to manipulate that data structure.

 

If you're not familiar with purely functional data structures, this
might not seem too helpful. Turns out, we need only go briefly into
this subject in order to gain the needed insight, so lets quickly
explore this topic before bringing the discussion back to Git.

more...
No comment yet.
Scooped by nrip
Scoop.it!

What's New in NetBeans 7.3: HTML5!

What's New in NetBeans 7.3: HTML5! | Code it | Scoop.it

Historically, HTML editors have been fairly awful. Many IDEs forced you to create dumb projects, insisted on particular doctypes, or favored deprecated tags. JavaScript editing could be worse: the editor programmers didn’t understand the language so even basic features such as function lists could fail.

 

Fortunately, the situation has improved and NetBeans 7.3 has been released with full support for HTML5, CSS and JavaScript. The cross-platform IDE now includes an HTML project wizard which allows you to select popular boilerplate templates and JavaScript frameworks:

more...
No comment yet.
Scooped by nrip
Scoop.it!

InfoSec Institute Resources – Hacking Applets: A Reverse Engineering Approach

InfoSec Institute Resources – Hacking Applets: A Reverse Engineering Approach | Code it | Scoop.it

Web Applications using applets to transfer data between the client and server are hard to manipulate using security holes, because of the simple reason that code within the applet is difficult to modify. Although the code can be recovered by decompiling the applets, it is very difficult to get them recompiled back into a jar file after making the required changes. This is because the decompilation process always leaves codes portions that are not properly recovered and hence it needs to be reconstructed manually by the analyst, which is a very error-prone method. There will be a lot of dependencies that cannot be resolved and based on the compilation process, some information may be completely lost.

In this paper we’ll discuss a technique that can be used to modify code and without having to recompile the applet and it can be madeto run in a standalone manner so that it can be debugged live and the values can be manipulated to exploit security holes.

We’ll use a generally occurring deployment scenario:

The applets are signedThe applets run in the context of Internet Explorer, using proxy settings, etc… imported from the browser settings.

In the next section we’ll discuss the basics about java virtual machine, and class file format.

 
more...
No comment yet.
Scooped by nrip
Scoop.it!

Taking Some Pain Out Of Python Logging

Even the best of us hate logging in Python sometimes. And while a lot of its problems are actually just bad docs and terrible defaults in the past, there is some pain that can be avoided.

 

One of the big problems with logging in general is that every class and function reek of NIH in the name of cross-platform. And to make it even more fun, there are several ways to do it: standard library (which attracts most of the hate), Twisted, Logbook…

 

For example to get useful log rotation by day (whoever came up with rotating by size may be a good idea‽), you'd go forTimedRotatingFileHandler in stdlib, but in Twisted everything works slightly differently.

 

All of this isn't just annoying, it's also unnecessary. Your UNIX-like operating system – which you presumably use to deploy your applications – offers formidable solutions to both logging and rotating. It's out there for you to use. Since the 1980s.

more...
No comment yet.
Scooped by nrip
Scoop.it!

W3Conf Videos Showcase the Latest in Web Standards

W3Conf Videos Showcase the Latest in Web Standards | Code it | Scoop.it
The W3C has put all the videos from its recent W3Conf online, offering web developers a treasure trove of tips, tricks and how-tos for using web standards.

 

Among the highlights are Eric Meyer’s talk on Flexbox, and the future of sane layout tools — what Meyer calls “the Era of Intentional Layout.” Meyer’s talk is also notable for the reminder that, in Mosaic, styling a webpage was something users did, not page creators.

 

Another highly recommended talk is Lea Verou’s “Another 10 things you didn’t know about CSS.” The “Another” bit in the title refers to a talk Verou gave last year entitled “10 things you might not know about CSS 3.” Also be sure to read our recent interview with Verou for more on the W3C and web standards.

 
more...
No comment yet.
Scooped by nrip
Scoop.it!

13 Reasons Why One Developer Dropped Google App Engine

13 Reasons Why One Developer Dropped Google App Engine | Code it | Scoop.it
Carlos Ble is a developer out of Spain. His company decided to use Google App Engine (GAE) but dropped it after what he said were months of delays.

 

Here are five issues Ble lists that give a sense of the problems his team encountered.

It requires Python 2.5, which is really old. Using Ubuntu that means that you need a virtualenv or chroot with a separate environment in order to work with the SDK properly: Ok, just a small frustration.You can't use HTTPS with your own domain (naked domain as they called) so secure connections should go though yourname.appspot.com: This just sucks.No request can take more than 30 seconds to run, otherwise it is stopped: Oh my god, this has been a pain in the ass all the time. When we were uploading data to the database (called datastore a no-sql engine) the upload was broken after 30 seconds so we have to split the files and do all kind of difficult stuff to manage the situation. Running background tasks (cron) have to be very very well engineered too, because the same rule applies. There are many many tasks that need to take more than 30 seconds in website administration operations. Can you imagine?Every GET or POST from the server to other site, is aborted if it has not finished within 5 seconds. You can configure it to wait till 10 seconds max. This makes impossible to work with Twitter and Facebook many times so you need intermediate servers. Again, this duplicates the time you need to accomplish what seemed to be a simple taskYou can't use python libraries that are build on C, just libraries written in python: Forget about those great libraries you wanted to use.
more...
No comment yet.
Scooped by nrip
Scoop.it!

Getting Started with Git in Visual Studio and Team Foundation Service

Getting Started with Git in Visual Studio and Team Foundation Service | Code it | Scoop.it

Availability of Git for Visual Studio and Team Foundation Service. 


Now, each time you create a new team project you have a choice: Team Foundation Version Control (TFVC) or Git? The best option for you depends on a lot of factors, including size of codebase, team size, and team distribution to name a few. Now that Git is fully integrated with TFS, the decision depends solely on what your team needs from version control. Looking at the strengths and features of each system can help make the decision easier.

 


more...
No comment yet.
Scooped by nrip
Scoop.it!

Ubuntu 12.10 review: Quantal Quetzal is quite adequate

Ubuntu 12.10 review: Quantal Quetzal is quite adequate | Code it | Scoop.it
Let's cut right to the chase: Ubuntu 12.10 is a totally, 100%, utterly, completely acceptable release.

 

It has some new features. It has some bug fixes. In almost every way, it is very, very similar to Ubuntu 12.04 - which makes a great deal of sense, considering that the two releases are only six months apart.

 

Over the next few days you are going to read a number of articles on this wonderful internet of ours about how Ubuntu has now integrated Amazon shopping into the desktop. This is, in no way, a bad thing...and anyone complaining about it is simply being a big baby.

more...
No comment yet.