Programming

add news feed

post a story

Venus.js in an open source software testing tool developed by LinkedIn that allows you to organize and run your entire JS testing system with a single tool using Node.js. Venus eliminates repetitive tasks and friction points and lets you...
Venus.js in an open source software testing tool developed by LinkedIn that allows you to organize and run your entire JS testing system with a single tool using Node.js. Venus eliminates repetitive tasks and friction points and lets you focus on writing tests instead of running them.
about 1 hour ago
Over the weekend, I started to look at using the Amazon Simple Storage Service (S3) with ColdFusion . One of the features that I looked at was generating pre-signed URLs in order to provide temporary access to the otherwise secure objec...
Over the weekend, I started to look at using the Amazon Simple Storage Service (S3) with ColdFusion . One of the features that I looked at was generating pre-signed URLs in order to provide temporary access to the otherwise secure objects stored in your S3 buckets. When I found out about this feature, my first thought was, "How can I use user-specific ... Read More »
about 1 hour ago
On-Demand Replay of Java EE 7 Launch Webinar is already available. You can watch the entire Strategy and Technical Keynote there, and all other Technical Breakout sessions as well. As stated previously, we are releasing the next s...
On-Demand Replay of Java EE 7 Launch Webinar is already available. You can watch the entire Strategy and Technical Keynote there, and all other Technical Breakout sessions as well. As stated previously, we are releasing the next set of Technical Breakout sessions on GlassFishVideos YouTube channel as well. In... [Read More]
about 1 hour ago
We're happy to announce the first beta release of django-pastedeploy-settings, a more maintainable way to define and override Django settings. Its features include:Simple, Python-free configuration files. The format used is INI because c...
We're happy to announce the first beta release of django-pastedeploy-settings, a more maintainable way to define and override Django settings. Its features include:Simple, Python-free configuration files. The format used is INI because configuration files should be declarative, not scripts.Settings can be inherited. For example, you can define your base settings in your project’s repository, while overriding some from a separate file outside your repository.Setting values are defined with JSON.Variable substitution, allowing you to define a value once and reuse it in different settings.Integration with Buildout, so that you can expose your Django settings to Buildout parts.Integration with Nose, so that you can easily set the settings to be used by your test suites.Under the hood, this library uses Paste Deployment, a widely-used system which has the sole purpose of enabling developers and sysadmins to configure WSGI applications (like Django) and WSGI servers.In spite of this being the first public release of this library, its code is based on twod.wsgi v1, a library which we've been maintaining and using in production for over 3 years.ExampleYou can keep the following file in your project’s repository:# base.ini[DEFAULT]django_settings_module = your_django_project.settings[app:main]use = egg:django-pastedeploy-settingsDATABASES = { "default": { "ENGINE": "django.db.backends.sqlite3", "NAME": "%(sqlite_db_path)s", } }And then have two separate files, one for development and the other for production, both of which will extend base.ini:# development.ini[DEFAULT]debug = truesqlite_db_path = /dev/your-project.db[app:main]use = /your-project-repository/base.iniSECRET_KEY = "weak key"DEBUG_PROPAGATE_EXCEPTIONS = true# production.ini[DEFAULT]debug = falsesqlite_db_path = /production/your-project.db[app:main]use = /your-project-repository/base.iniSECRET_KEY = "str0ng k3y"Alternatively, you can keep it all in one file:# settings.ini[DEFAULT]django_settings_module = your_django_project.settings[app:base]use = egg:django-pastedeploy-settingsDATABASES = { "default": { "ENGINE": "django.db.backends.sqlite3", "NAME": "%(sqlite_db_path)s", } }[app:development]use = baseset debug = trueset sqlite_db_path = /dev/your-project.dbSECRET_KEY = "weak key"DEBUG_PROPAGATE_EXCEPTIONS = true[app:production]use = baseset debug = falseset sqlite_db_path = /production/your-project.dbSECRET_KEY = "str0ng k3y"Get it while it's hot!
about 1 hour ago
Many application developers would know of New Relic. A SaaS performance and monitoring tool targeted towards your web application monitoring including PHP, Ruby, Java, .Net, Python and Node. With the release today (June 19, 2013) of the...
Many application developers would know of New Relic. A SaaS performance and monitoring tool targeted towards your web application monitoring including PHP, Ruby, Java, .Net, Python and Node. With the release today (June 19, 2013) of the New Relic Platform, custom monitoring of data stores including MySQL are now possible. Try it now free. This link will provide you a free standard account (no cost, no billing details necessary), that enables you to perform application monitoring, server monitoring, MySQL instance monitoring and monitoring of many other products via many plugins. Over the next few posts I will be discussing some of the design decisions I made for this MySQL plugin. New Relic has certain features that lend towards really helping developers monitor and diagnose the application (I have been surprised how it has helped in debugging DB and OS problems directly from PHP code for example). However, often it’s important that knowing the server resources, the database usage is critical to seeing the whole picture, and with the new plugins, New Relic gives developers, system administrators and database administrator some well targeted insights. When building custom dashboards you can see CPU usage, Database usage, and your web application volume, page load time and other metrics on one page. The MySQL plugin has two pre-requisite requirements. A MySQL server running 5.0 or better, and a Java JRE 1.6 or better. The plugin can work either directly on each MySQL server/instance, and therefore needs the JRE, or it is possible to configure a single server to collect all MySQL statistics and report them to New Relic. There are no specifics that restrict this plugin working for any MySQL variants/forks, infact I specifically designed the plugin to be forward compatible with new version and status variables for example, and support custom recording of any metrics (more on that later). This is first release of the New Relic Platform and MySQL plugin so I expect a lot of refinements, improvements and suggestions as we move forward. As an integral part of developing the MySQL plugin and using the New Relic Java SDK, there are a number of roadmap items to better serve MySQL and other products that will be coming in future releases. The beta version of the MySQL plugin has been running on production MySQL servers for several months now and working well. New Relic provides two ways to display data, first by graphs, and second by tables. There is a handy information option in the Server monitoring that is not presently available for the plugins. Graphs work best with multiple data points and constantly changing data and records averages. When looking at the SQL commands for example is great to see the total breakdown, monitoring MySQL replication lag (a single metric), that hopefully is generally zero can appear a little bland. A cool trick is to click on the legend, this toggles the displayed value, and can really help when one value in a graph hogs the metric. At present the plugin has 4 tabs of display: Overview provides a high level view of total reads v total writes, database connections, network communications and a table of key utilizations (which I will discuss more in another post) Query Analysis shows details of SQL commands, temporary (memory/disk) tables, slow queries, query cache usage, select query types, sort types and table locking. InnoDB Metrics include buffer pool operations, a page breakdown, row operations, log writes, log and data fsyncs, checkpoint age, history list, internal threads and mutexes. Replication shows lag, relay log volume, I/O thread lag, slave errors and master binary log volume (when on a master). The plugin is written to be extensible via JSON configuration. Those wishing to monitor different variables, or say custom metrics from storage engines like Tokutek can be easily defined, either a key/value set, or single row of metrics. However, the initial version of the dash
about 1 hour ago
Hi! I have little trouble with reverse function in my project. When I run it over ./manage runserver, everything is fine - reverse gives me url in /page/xx format. When I run my project over apache2 using this conf file: Listen 8001 ...
Hi! I have little trouble with reverse function in my project. When I run it over ./manage runserver, everything is fine - reverse gives me url in /page/xx format. When I run my project over apache2 using this conf file: Listen 8001 ServerName project.tld DocumentRoot "/var/www/project"
about 2 hours ago
HTML5 framework is a hike language which is used to structure as well as present the content for word wide web (www). It also present in a wide number of core technology for the internet. The presences of core elements have been used to ...
HTML5 framework is a hike language which is used to structure as well as present the content for word wide web (www). It also present in a wide number of core technology for the internet. The presences of core elements have been used to improve language with support from multimedia.
about 2 hours ago
darthcamaro writes "Remember back in the day when we all used CVS? Then we moved to SVN (subversion) but in the last three yrs or so everyone and their brother seems to have moved to Git, right? Well truth is Subversion is still going st...
darthcamaro writes "Remember back in the day when we all used CVS? Then we moved to SVN (subversion) but in the last three yrs or so everyone and their brother seems to have moved to Git, right? Well truth is Subversion is still going strong and just released version 1.8. While Git is still faster for some things, Greg Stein, the former chair of the Apache Software Foundation, figures SVN is better than Git at lots of things. From the article: '"With Subversion, you can have a 1T repository and check out just a small portion of it, The developers don't need full copies," Stein explained. "Git shops typically have many, smaller repositories, while svn shops typically have a single repository, which eases administration, backup, etc."'" Major new features of 1.8 include switching to a new metadata storage engine by default instead of using Berkeley DB, first-class renames (instead of the CVS-era holdover of deleting and recreating with a new name) which will make merges involving renamed files saner, and a slightly simplified branch merging interface. Read more of this story at Slashdot.
about 2 hours ago
This is a guest post by Jesse Storimer, esteemed author of Working with Unix Processes, Working with TCP Sockets and Working with Ruby Threads. There are some misconceptions in the Ruby community about this question surrounding MRI's GI...
This is a guest post by Jesse Storimer, esteemed author of Working with Unix Processes, Working with TCP Sockets and Working with Ruby Threads. There are some misconceptions in the Ruby community about this question surrounding MRI's GIL. If you only take one thing away from this article today, let it be this: The GIL does not make your Ruby code thread-safe. But you shouldn't take my word for it. This series started off just trying to understand what the GIL is at a technical level. Part 1 explained how race conditions could occur in the C code that's used to implement MRI. Yet, the GIL seemed to eliminate that risk, at least for the Array# method we looked at. Part 2 confirmed that the GIL did, in fact, make MRI's native C method implementations atomic. In other words, these native implementations were free from race conditions. These guarantees only applied to MRI's native C functions, not to the Ruby that your write. So we were left with a lingering question: Does the GIL provide any guarantee that your Ruby code will be thread-safe? I've already answered that question. Now I want to make sure that the misconception doesn't go any further. Race conditions redux Race conditions exist when some piece data is shared between multiple threads, and those threads attempt to act on that data at the same time. When this happens without some kind of synchronization, like locking, your program can start to do unexpected things and data can be lost. Let's step back and recap how such a race condition can occur. We'll use the following Ruby code example for this section: class Sheep def initialize @shorn = false end def shorn? @shorn end def shear! puts "shearing..." @shorn = true end end This class definition should be nothing new. A Sheep is not shorn when initialized. The shear! method performs the shearing and marks the sheep as shorn. sheep = Sheep.new 5.times.map do Thread.new do unless sheep.shorn? sheep.shear! end end end.each(&:join) The bit of code creates a new sheep and spawns 5 threads. Each thread races to check if the sheep has been shorn? If not, it invokes the shear! method. Here's the result I see from running this on MRI 2.0 several times. $ ruby check_then_set.rb shearing... $ ruby check_then_set.rb shearing... shearing... $ ruby check_then_set.rb shearing... shearing... Sometimes the same sheep is being shorn twice! If you were under the impression that the GIL made your code 'just work' in the presence of multiple threads, this should dispel that. The GIL can make no such guarantee. Notice that the first time running the file, the expected result was produced. In subsequent runs, unexpected output was produced. If you continued running the example, you'll see still different variations. These unexpected results are due to a race condition in your Ruby code. It's actually a common enough race condition that there's a name to describe this pattern: a check-then-set race condition. In a check-then-set race condition, two or more threads check a value, then set some state based on that value. With nothing to provide atomicity, it's possible that two threads race past the 'check' phase, then both perform the 'set' phase. Recognizing race conditions Before we look at how to fix this, first I want you to understand how to recognize this. I owe @brixen for introducing to me the terminology of interleavings in the context of concurrency. It's really helpful. Remember that a context switch can occur on any line of your code. When switching from one thread to another, imagine your program being chopped up into a set of discrete blocks. This sequential set of blocks is a set of interleavings. At one end of the spectrum, it's possible that there's a context switch after every line of code! This set of interleavings would have each line of code interleaved. At the other end of the spectrum, it's possible that there a
about 2 hours ago
In the first installment of this two-part series on type classification, we covered the basics of type classification — the various methods people have used, why they are helpful, and a brief survey of type history, classifying and...
In the first installment of this two-part series on type classification, we covered the basics of type classification — the various methods people have used, why they are helpful, and a brief survey of type history, classifying and identifying typefaces along the way. Unfortunately, we only got as far as Roman (traditional serif) typefaces and the early-19th century. Now we’re back for part 2! Part 2 will primarily cover sans typefaces, with a nod to display typefaces and other less common categories, as well as address a few of the questions people have about whether type classification is helpful and necessary. If you haven’t read part 1, now’s your chance to go over it. It lays important groundwork for this article, covers the categories of serif typefaces, and contains plenty of useful information about the development of serif type. If you already have read it, here is a quick recap to get us started before we move on to the new material. Review Type Classification Systems Type has been classified in many ways over the years, both formal and informal — Thibaudeau, Vox, British Standards, etc. None of these are complete or all-encompassing, but they’re helpful as an aid to study as well as for learning to use type correctly and effectively. The material in this two-part series draws heavily from the Vox-ATypI system, which is the most “official” of the systems today, having been adopted by the Association Typographique Internationale in 1962 and still the most commonly referenced system. Is it perfect? No, but it provides a good overview of what is out there; and when you describe typefaces using the terms you’ll learn in this series, anyone who is reasonably familiar with typography will know what you’re talking about. Here is a quick overview of the type categories we covered in part 1. Humanist/Venetian Notable calligraphic influence, patterned after handwriting. Strongly angled axis or stress. Based on typefaces designed in Renaissance cultural hubs such as Venice. Garalde Less calligraphic influence because type began to be viewed as separate from writing. Named after influential type designers Claude Garamont and Aldus Manutius. Still has a tilted axis but less obvious than in Humanist type. Transitional/Neoclassical No calligraphic influence. Designed independently, sometimes on a grid. First appeared in the late-17th century. Virtually vertical axis and high contrast between heavy and thin strokes. Didone Extreme contrast between thick and thin. Rigidly vertical axis. Abrupt, or unbracketed, serifs. Very precisely designed. Named after Firmin Didot and Giambattista Bodoni. Slab Serif Very heavy weight and low contrast between thick and thin. Unbracketed, prominent serifs. First typefaces created expressly for display purposes. Sans Serifs When we left off in part 1, it was circa 1815, with the first appearances of slab serifs, also called Mechanistics or Egyptiennes. By the time slab serifs were being popularized, early sans serifs had already been around for some time in a variety of forms. To follow the progression of sans serifs, we must step back in time a number of years. History of Sans Serifs The earliest sans-serif letterforms were, of course, not type, but inscriptions, dating back to as early as the 5th century BC, and enjoyed a resurgence in engraving and inscriptions in the 18th century. Caslon’s Etruscan type, as seen in a 1766 specimen book. Larger view. (Image source: Typefoundry) Strangely enough, the first “sans serif” type was created not for the Latin alphabet, but for use in 18th-century academic works on Etruscan culture, which preceded the Roman Empire in the geographical area of modern-day Italy. Circa 1748, the foundry of William Caslon (with whom you should be familiar) cut the first known sans-serif Etruscan type for the Oxford University Press, although there are earlier usages of sans serifs in similar applications. Haüy’s type, created to emboss pages so as
about 2 hours ago