Xi 0

Posted by yrashk

It seems that it is a last post in 2006.

I’ve launched a Wiki-site for Xi, a hybrid of a database and a programming language.

Nothing new actually, just a short intro extracted from older blog posts, and few downloads revived (design.pdf, compiler.pdf, some implementation experiments).

I strongly plan to continue work on Xi in 2007.

I feel that there will be some demand for this kind of environments in future and actually it is very much fun to design and develop such kind of systems.

Happy New Year and see you soon!

Small Ruby Tip 16

Posted by yrashk

Can’t stop blogging before New Year.

Just a simple tip for those who feel a need in defining a set of test-purpose classes in their tests/specifications.

Don’t forget that classes are objects.

So you can just use this:


Class.new
# or
Class.new(Superclass)
# or
Class.new(Superclass).class_eval do
  ...class content definition goes here...
end

One problem is that class_eval does not return class itself, so you can’t go further with one-line class creation, like:

 
 @test_baseclass = Class.new.class_eval do
  ...class content definition goes here...
 end
 

But thanks to Ruby, it is easy to hack around:

 
class ReturnSelfAfter

  def initialize(context)
    @context = context
  end

  def method_missing(sym,*args,&block)
    @context.send sym, *args, &block
    @context
  end

end

class Object
  def return_self_after
    ReturnSelfAfter.new(self)
  end
end

 

Please note that the above code is not perfect and it will fail proxying Object’s methods; but anyway it does what we need to solve a problem.

So, now you can:

 
@baseclass = Class.new.return_self_after.class_eval do
    ...class content definition goes here...
end

and @baseclass will be a class.

I’ve found it extremely useful for testing Rails plugin I’m developing now.

Why TDD 0

Posted by yrashk

Andrey Khavryuchenko wrote another nice article on TDD.

I’ve been talking a lot about it within Railsware with new employees recently since it is the way we are delivering reasonably good software on time and budget.

Actually we’re currently using RSpec and we’re pretty happy with it. It allows us to express our tests in (almost) English and our tests are nicely structured.

I remember days when I wasn’t using test-driven or behaviour-driven development and I actually can’t understand how I was delivering result that days.

Happy New Year!

2006 Review 2

Posted by yrashk

Despite I was suffering from certain health problems all this year, I’ve found it really exciting, and quite successful. So to mention some facts:

  • Business
    1. I’ve founded VERBDEV company for an edge web and database research&development activities.
    2. I’ve co-founded Railsware outsourcing development team and I like what I see in terms of growth, projects, leads and revenue.
    3. I’ve found sales and negotiations interesting
  • Technology
    1. I’ve worked a lot on Xi, a research for a hybrid of a metaframe database and a programming language (sorry, code examples are broken there). It is a continuation of a research on programming techniques I’m doing from 2001 and it is what I do not want to abandon. I have no much time for it now, but I haven’t forgot about it.
    2. I’ve switched to Macs this year. I got rid of Linux and Windows and some hardware and now own Mac Mini and MacBook. I found that I really like this piece of technology. While it is not perfect, I like to see how my productivity was improved.
    3. I had at least doubled my Ruby on Rails experience (using it for second year)
    4. Gary Furnish and me has created a machine-readable x86 instruction set database.
  • Personal
    1. I’ve quit smoking and drinking alcohol (thanks to diseases)
    2. I got much more success in relations with women
    3. I have noticed some (positive?) changes in own character

Of course, not all goals are reached, not everything is absolutely perfect. There is still lot of things to be done. There is still a lot of things to improve in myself in terms of being more productive and successful. I’m sure I’ll do what I want. See you in 2007!

5 Things You Didn't Know About Me 1

Posted by yrashk

Matt from Slicehost has tagged me to write 5 things about myself you didn’t know.

Okay, let me try.

  1. I have not finished my higher education
  2. I’m a big fan of The Simpsons and Futurama
  3. I’ve left city of birth almost 4 years ago
  4. One of my first computers was SURA PK8000
  5. My hairs were relatively short in 2005

And I tag: Andrey

Non-mainstream technologies 0

Posted by yrashk

Another nice article written by Andrey Khavryuchenko.

One of the reasons I’ve founded VERBDEV was an ability to innovate in the best possible way, having no restrictions on technologies choosed for a project.

I believe that proper technology is at least 25% of success. Proper technologies usually lead to proper architecture, good decisions and healthy development cycle.

One of the projects I’m working for few years is a hybrid of metaframe database and programming language. Guess what languages I’ve used for prototypes/models?

And yes, I agree with Andrey—non-mainstream technologies are for startups. For some of them they could be decisive.

Well Formed Outcome 0

Posted by yrashk

Nice article about well formed outcome written by my friend and partner, Andrey Khavryuchenko.

To be continued.

10% Discount Offer 0

Posted by yrashk

We at Railsware are planning Q1&Q2 2007 now and we are ready to offer discount for projects to be done in the first half of 2007.

Request a quote for your project before Dec 25, 2006 and you will get 10% discount for one project done in the first half of 2007, no matter for which quarter (Q1 or Q2) you’re planning actual project development.

You aren’t obliged to sign any contract and neither pay something up-front to be eligible for this discount. Just drop us a line to contact@railsware.com requesting a free quote before Xmas and voila! you’re eligible to get discounted project development.


XMAS OFFER at Railsware website.

Rails: Deprecation Warnings 2

Posted by yrashk

Feel sick about deprecation warnings in your tests? Well, until you will fix your code, you can try adding

 
   ActiveSupport::Deprecation.silenced = true unless ENV['SHOW_DEPRECATED']
 

to config/environments/test.rb

After this change, you will not see deprecation warnings unless you will run rake or rake spec with SHOW_DEPRECATED env. variable set, like

 
   rake spec SHOW_DEPRECATED=y
 

Railsware 0

Posted by yrashk

I’m happy to announce that I have launched a new business project with my partners.

This is a Ruby on Rails outsourcing software development office named Railsware.

This development office provides services for Web 2.0 startups that would like to benefit from using edge web technologies, such as Ruby on Rails, AJAX and Flex.

We have an effective team of 5 people running this project and we’re still actively hiring new people in order to complete every project requested.

We’re located in Kyiv, Ukraine and you know that Ukraine is one of the top outsourcing destinations.

We have developers both in our ergonomic office and out of the office, so we are utilizing each developer in a way he likes to work. We prefer to let our developers feel comfortable.

Let me introduce my partner, Andrey. He is a top manager of this project.

We’re already running a few projects development and you’re welcome to outsource your development to us. We strictly encourage signing NDA to protect your intellectual property assets.

Feel free to drop a line to contact@railsware.com for additional information or a free quote.

Job Ads 0

Posted by yrashk

I’ve launched a job ad board for my blog.

According to Google Analytics, this blog had 1,236 unique visitors since November 2006.

Also it is being read by Ukrainian developers’ community (it is a part of developers.org.ua network), and as you may know Ukraine is one of the top outsourcing destinations, so you’ll have a chance to hire talented Ukrainian developers here.

Job ads are cross-posted to ukrainian Ruby On Rails community wiki (which is not as popular as this blog, but it was launched just few days ago in conjunction with ua-rubyonrails mailing list).

Each job ad is sold for $30 for 30 days, $1 for 1 day.

To those who will advertise first, I propose a FIRSTAD coupon that will cut costs to $10. The rest can use JOBAD coupon that will cut costs to $15 (coupon is valid until Jan 3, 2007).

Publish your job ad now!

RSpec 0.7.4 0

Posted by yrashk

I’ve missed the fact that RSpec 0.7.4 is released. Among other issues, it fixes major problem with fixtures I’ve mentioned earlier

== Version 0.7.4

This release features a complete redesign of the reports generated with --format html.
As usual there are many bug fixes - mostly related to spec/rails.

* Applied [#7010] Fixes :spacer_template does not work w/ view spec (patch from Shintaro Kakutani)
* Applied [#6798] ensure two ':' in the first backtrace line for Emacs's 'next-error' command (patch from Kouhei Sutou)
* Added Much nicer reports to generated website
* Much nicer reports with --format --html (patch from Luke Redpath)
* Applied [#6959] Calls to render and redirect in controllers should return true
* Fixed [#6981] helper method is not available in partial template.
* Added [#6978] mock should tell you the expected and actual args when receiving the right message with the wrong args
* Added the possibility to tweak the output of the HtmlFormatter (by overriding extra_failure_content).
* Fixed [#6936] View specs don't include ApplicationHelper by default
* Fixed [#6903] Rendering a partial in a view makes the view spec blow up
* Added callback library from Brian Takita
* Added [#6925] support controller.should_render :action_name
* Fixed [#6884] intermittent errors related to method binding
* Fixed [#6870] rspec on edge rails spec:controller fixture loading fails
* Using obj.inspect for all messages
* Improved performance by getting rid of instance_exec (instance_eval is good enough because we never need to pass it args)

P.S. Don’t forget to run ./script/generate rspec after configuring plugin for 0.7.4 and overwrite spec/spec_helper.rb

Rails Repository News 0

Posted by yrashk

I was reviewing Rails Changelog for few past days, and here is what I found interesting:

  • It appears that default server for ./script/server is Mongrel now (also it seems to support Lighttpd and Webrick as well)
  • One-letter aliases were added to script/console (t – test, d – development, p – production)
  • Capistrano tool was updated to reflect deprecation of ‘migrate’ task (uses ‘db:migrate’ instead)
  • http_authentication plugin was checked into repository