Google Font API
Google recently debuted a new web service called the Font API. Google's Font API provides developers a means by which they may quickly and painlessly add custom fonts to their website. Let's take a quick look at the ways by which the Google Font API can be used. Font Request Format Many of the fonts within Google's font archive are available not only in standard format but also in Italic, Bold, and Italic Bold. Here are a few examples of requesting each variant: Cantarell Cantarell:bold Cantarell:italic Cantarell:bolditalic Now let's see how we can include special fonts in our page and use these them. The CSS Stylesheet Method The stylesheet gets included into the page like any other stylesheet would be. Take a moment to examine the stylesheet from Google: The @font-face method of font embedding is Google's chosen method. You may also embed the font within the "style" attribute of a given element: <p style="font-family:'Vollkorn';">Lorem ipsum.... I t doesn't get more painless than that.
Practical Introduction into Code Injection with AspectJ, Javassist, and Java Proxy
The ability to inject pieces of code into compiled classes and methods, either statically or at runtime, may be of immense help. This applies especially to troubleshooting problems in third-party libraries without source codes or in an environment where it isn’t possible to use a debugger or a profiler. Code injection is also useful for dealing with concerns that cut across the whole application, such as performance monitoring. This post is aimed at giving you the knowledge that you may (or I should rather say “will”) need and at persuading you that learning basics of code injection is really worth the little of your time that it takes. Why You Are Going to Need It A lot has been already said about the advantages of AOP – and thus code injection – so I will only concentrate on a few main points from the troubleshooting point of view. The coolest thing is that it enables you to modify third party, closed-source classes and actually even JVM classes. Mini Glossary Advice Aspect Joint point I.
jQuery
How do you judge a javascript programmer by only 5 questions
Building Filesystems the Way You Build Web Apps (Ksplice Blog)
FUSE is awesome. While most major Linux filesystems (ext3, XFS, ReiserFS, btrfs) are built-in to the Linux kernel, FUSE is a library that lets you instead write filesystems as userspace applications. When something attempts to access the filesystem, those accesses get passed on to the FUSE application, which can then return the filesystem data. It lets you quickly prototype and test filesystems that can run on multiple platforms without writing kernel code. FUSE has a reputation of being used only for toy filesystems (when are you actually going to use flickrfs?) But because the FUSE API calls separate functions for each system call (i.e. getattr, open, read, etc.), in order to write a useful filesystem you need boilerplate code to translate requests for a particular path into a logical object in your filesystem, and you need to do this in every FUSE API function you implement. Take a page from web apps RouteFS: URL routing for filesystems Getting started #! Populating the filesystem ~broder
Node.js
Relative Import with SASS ← jefffabiny
While working with SASS and the Scout application I ran into a small problem. I was tasked with a color scheme change for the Concrete5 template were building. This of course is not that big of an issue, but what kind of programmer would I be if I didn’t abstract all repetitive tasks into single, easily manageable occurrence? At the time, all my colors were explicitly defined with hexadecimal codes in my CSS. My first thought was to create color variables and throw them at the top of each SASS file I would need them in. The first step was to create the file, and it looks like this: I put this at the project root directory. @import '../../../../../.. This is ugly. I attempted to have multiple @import statements, but files/paths that don’t exist throw an error in the SASS compiling. The final product looked like this: Each individual .scss file: @import 'color_constants'; The config-template.rb tracked by Git: # Rename this file to config.rb
Squares Aren’t Rectangles? A Common Misunderstanding of Object Oriented Design From MSDN Magazine | DoubleCloud.org
While reading the recent Dec 2010 issue of MSDN magazine, I found an article (Multiparadigmatic .Net, Part 4: Object Orientation) with misunderstandings on object oriented design. I was surprised that the author reached conclusions like, “squares aren’t rectangles,” and “no happy ending here.” The conclusions are based on misunderstandings of object oriented design. Let me show you what the root problem is and how to get a happy ending. What’s the problem? As most people already know, inheritance or generalization (I prefer the latter) is an important feature of OOD. What about Square and Rectangle? As you can find out, the Square has equal height and width and you would need only one attribute Edge for this like the following: Now thinking of “a square is a rectangle,” people might consider how to convert a square and a rectangle. To root cause this design problem, the author concluded that “Square aren’t rectangles. Why are Squares Still Rectangles? Unfortunately it’s NOT.