Making use of the string class add-on that I developed at the recent Goruco conference.
I've put together a simple little app and a domain where some of the code is available to anyone who can use it.
Please contact me if you are interested any part of this.
Technology Agnostic Rubyist : Open Source Lights The Way
Showing posts with label Ruby. Show all posts
Showing posts with label Ruby. Show all posts
Friday, July 31, 2009
Friday, November 14, 2008
Dirty numbers
/$#@!
This is a pretty basic programming concept but I haven't touched this blog in a while here we go...
Say you're working with numbers in a database field. Those numbers were keyed in by people using a different system, and the other system somehow stored non-numeric values in a numeric field.
Since Ruby does not have strong typing, an easy way to check and see if a field is an integer is to compare its integer value with its actual value.
if (somefield.to_i == somefield)
For example:
n = 1234567
if (n.to_i==n) => true
If the value of n is not keyed properly the equality test returns false
n = "12345x67"
if (n.to_i=="12345x67") => false
Easy!
This is a pretty basic programming concept but I haven't touched this blog in a while here we go...
Say you're working with numbers in a database field. Those numbers were keyed in by people using a different system, and the other system somehow stored non-numeric values in a numeric field.
Since Ruby does not have strong typing, an easy way to check and see if a field is an integer is to compare its integer value with its actual value.
if (somefield.to_i == somefield)
For example:
n = 1234567
if (n.to_i==n) => true
If the value of n is not keyed properly the equality test returns false
n = "12345x67"
if (n.to_i=="12345x67") => false
Easy!
Labels:
check,
conversion,
isint,
isinteger,
number,
Ruby,
validation,
varchar
Friday, February 22, 2008
Visually impaired software development
This is my work blog.
I will present ideas (very) informally, as well as shortcuts and tips that I learn and use for application development.
Since working at Lighthouse International during 2006 and 2007 I have become enamored with Ruby as a programming language. Mainly I love the fact that it's open source, though I'm still using Microsoft SQL Server for the databased operations and have been happy with this database server for a long time.
The idea for Ruby on Braille came to me when as a team, we three developers, (Mike Hill, Rathnavel Kandaswami, and myself) were toying with the idea of building something new, a program that had never been built before. As is often the case with open source software there are a lot of free resources, but it can be hard to separate signal from noise and often as developers we must simply "roll our own" code, modify existing programs, and evaluate the effectiveness and reliability of free solutions.
So while I don't plan on offering any free solutions I will tell you about my experience as a software developer.
I will present ideas (very) informally, as well as shortcuts and tips that I learn and use for application development.
Since working at Lighthouse International during 2006 and 2007 I have become enamored with Ruby as a programming language. Mainly I love the fact that it's open source, though I'm still using Microsoft SQL Server for the databased operations and have been happy with this database server for a long time.
The idea for Ruby on Braille came to me when as a team, we three developers, (Mike Hill, Rathnavel Kandaswami, and myself) were toying with the idea of building something new, a program that had never been built before. As is often the case with open source software there are a lot of free resources, but it can be hard to separate signal from noise and often as developers we must simply "roll our own" code, modify existing programs, and evaluate the effectiveness and reliability of free solutions.
So while I don't plan on offering any free solutions I will tell you about my experience as a software developer.
Labels:
Active Record,
Ajax,
Blog,
Rails,
Ruby,
Ruby on Rails,
SQL Server
Subscribe to:
Posts (Atom)