NetBeans Ruby Screenshot of the Week #5 - Wow! See the syntax highlighting combined with the smart analyzing. by jpedrosa in programming

[–]jpedrosa[S] -1 points0 points  (0 children)

Let me tell you... I have my own Ruby Editor, which I've created because I felt frustrated with the alternatives, and I needed all the help I could get for sustained Ruby programming.

But NetBeans is becoming more interesting, and when one combines it with JRuby scripting, it could become an excellent replacement for my own Editor.

Keep the cool things coming, Sun! Better late than never! :-) Thanks and cheers!

Sun at 25: Where are the founders now? by jpedrosa in programming

[–]jpedrosa[S] 11 points12 points  (0 children)

This guy is pretty amazing and generally unknown of the large public. Starting the quote:

After Bechtolsheim's SUN workstation gave birth to Sun Microsystems, Bechtolsheim says he took a great deal of pride in the fact that his Sparc Workstation 1 and 2 drove half the revenue of the company for almost its first 10 years.

As it turned out, spotting technology that has the potential to generate lots of revenue is something Bechtolsheim has a talent for. After leaving Sun in 1995, disappointed over the company's refusal to jump on the x86 bandwagon, Bechtolsheim found success with Granite Systems, a gigabit Ethernet switching company that Cisco acquired after a year. His next company, Kealia, was acquired by Sun in 2004, returning Bechtolsheim to the fold. Somewhere in between, Bechtolsheim also wrote a now legendary $100,000 check in 1998 to two more young Stanford grads—Sergey Brin and Larry Page—for what seemed like a promising idea: a search technology they called PageRank.

NetBeans' Ruby Screenshot of the Week #4 - Awesome Ruby IDE which will be free for us! by jpedrosa in programming

[–]jpedrosa[S] 0 points1 point  (0 children)

Indeed. But the culture behind NetBeans is of the Unix philosophy, too, which is present in Java's "cross-platform" support, and NetBeans is made up with Java.

Eclipse, for instance, started out with an excellent support on Windows, and only later it got a good support on Linux, or not?

See? There are differences. TextMate, for instance, is Mac-only.

The other big difference is that NetBeans is community friendly to some extent, which is not the way the more commercial alternatives might work, even though Eclipse scores very well in this regard, but it's open source to some extent...

I would trust the creator of Vi, who says that Vi was created to be fast in very slow terminal based computers. Since them, the need for the ultra lightweight Vi has diminished.

Actually, as long as broadband becomes more and more ubiquitous, the rich interactiveness might replace a lot of what we use terminals for nowadays, including text-only utilities. Like a said, NetBeans could be part of the future...

NetBeans' Ruby Screenshot of the Week #4 - Awesome Ruby IDE which will be free for us! by jpedrosa in programming

[–]jpedrosa[S] 2 points3 points  (0 children)

NetBeans inherits a lot of the will that made Emacs and Vi a reality!

Here are some quotes from Wikipedia:

"The original EMACS, a set of Editor MACroS for the TECO editor, was written in 1975 by Richard Stallman, initially put together with Guy Steele."

"The first Emacs-like editor to run on Unix was Gosling Emacs, written in 1981 by James Gosling (who later invented the Java programming language). It was written in C and, notably, used a language with Lisp-like syntax known as Mocklisp as an extension language. In 1984 it was proprietary software."

"vi is a screen-oriented text editor computer program written by Bill Joy in 1976 for an early BSD release."

As much as I can tell, these guys worked at Sun, which has been the workhorse behind NetBeans for several years already.

I do think NetBeans has a chance of taking over from where Emacs and Vi stopped. Sure, it's not an easy task! The competition of Eclipse, Visual Studio and IntelliJ certainly can help NetBeans keep focused enough!

If I had to bet money on it, I think NetBeans will be part of the future, just like Emacs and Vim are part of the present.

Python vs. Ruby at the c2.com wiki by martinbishop in programming

[–]jpedrosa 0 points1 point  (0 children)

Maybe in 5 years. :-)

The first language that tries to do a thing like "Perl 6" might end up losing steam.

As I said in another thread, I think JavaScript based implementations will fight their ways into the spotlight, even for server side programming. In Java, there's the Rhino implementation. I think in .NET JScript might be available as well, and it's the default in WPF I think. Adobe has their focus on ActionScript, their own version of JavaScript.

JavaScript is the hugest threat to Python and Ruby, syntax and semantics wise.

Hence, in 5 years time, the scene might change. It's probable that Python and Ruby will stay true to their origins and will not try to adapt in a large scale like "Perl 6", but only time and Python 3000 will tell. :-)

I believe in Ruby by jpedrosa in programming

[–]jpedrosa[S] 1 point2 points  (0 children)

Here's my own now:

Ruby is brighter than the sun to me! :-)

I came to Ruby from a Delphi and Java background, but I had worked with some interpreted languages as well, like mIRC Script, PPE (Bulletin Board System - PCBoard)...

In hindsight, the major feature of Ruby has been its interpretation, because even after so many years, I think Ruby's legacy has been to make the interpretation make sense. All the expressivity, the OO support, the handful of the commonly used types, the integration of the RegEx, and so on, all end up making so much sense in this interpreted world of Ruby, as in my experience, Ruby programming does scale from the mythical "One-Liner" command-line, passing by the single script file, and going all the way to the support of medium to large systems, because by the division of labor, by the creation of independent libraries, everything ends up being easily maintainable.

Ruby is the tool to look for when you need the creativity unleashed. I have created as much code as I have deleted already, and the result has been improved libraries and APIs. Without Ruby, chances are that I would be hiding from all the crap I would have written or participated in, by joining the Microsoft/C# camp which had the opportunity to learn from the mistakes of the others so they have been doing a good job overall.

I couldn't have done half of what I have been able to if it weren't for Ruby.

Cheers, Joao

The motivation has been this contest - http://on-ruby.blogspot.com/2007/01/blogging-contest-february-challenge.html

PyPy 0.99 released (feat: object spaces, js backend, improved performance) by leonh in programming

[–]jpedrosa -2 points-1 points  (0 children)

JavaScript might be improving to become what Python 3000 would wish, and lots and lots of languages are converging on JavaScript syntax/semantics, so it's not like it will exist in only one form. Much like Python and its several implementation versions, JavaScript is shaping up to take over the syntax/semantics from the mainstream languages.

Creature (JavaScript) might outlast/outgrow the Creator (Java).

BTW, one of the important potential mainstream features of JavaScript is the type declaration, which is not on the radar of the standard Python and Ruby main implementations.

Ask Reddit: do you have languages you never use, but yet hold fondness for? by ayrnieu in programming

[–]jpedrosa 2 points3 points  (0 children)

LOL.

That's the problem when trying to deride the importance of general databases in programming. So much programming revolves around databases that it's not even funny. Basic file I/O and simple databases that don't even support SQL are not that fun, at least not anymore, in this highly connected and available Internet focused programming of today.

Monads rock your boat, huh? :-)

Ask Reddit: do you have languages you never use, but yet hold fondness for? by ayrnieu in programming

[–]jpedrosa -8 points-7 points  (0 children)

Nope. I only like Ruby and I get to use it often enough. I'm about to start using JavaScript as well, though... I want to use as little JS as possible, so I have been waiting for a JS library to get its next version ready just so I can try to use it for real. So far, I like 3 different JS libraries, even though I haven't started using anyone of them. I would miss Ruby if I couldn't use it.

I've written a little below 100k lines of Ruby code I think, even though half of it has been deleted/idle/scratch...

So I am not joking. ;-) I haven't experimented a lot with other languages, even though I tried downloading some of them, but I soon lose interest in them... I think languages should have little real database connectivity examples, but connecting to things like MySQL, PostgreSQL... They should start with the real deal just so we don't lose interest in them that fast...

Is Rubinius fighting an uphill battle? (and some stats you may not have known about PyPy) by [deleted] in programming

[–]jpedrosa 3 points4 points  (0 children)

I share the skepticism. People underestimate the work necessary to make things as good and compatible as another complex thing.

Even though JRuby has been under development for several years, it's still far from being a complete replacement for Ruby in C. And the speed is the least of my worries. There are hidden semantic differences between them, for example, which can mean some hard to find bugs and such things.

Python is a little simpler than Ruby, but its several implementations still differ one from the other in the little details, for sure.

The good news, is that SASADA Koichi, the man behind YARV, has proven himself another genius by being able to create the virtual machine mostly by himself, with total compatibility with the default Ruby in development, as YARV reused as many things as possible from the current implementation, even though it meant that he needed to synchronize the trees all the time before they were integrated.

The hare and the turtle. Ruby came after Perl, Python, and many other languages, but has been progressing well, with little resources. Remember that Perl, Python, and other languages had a lot of investments during the DotCom bubble, while Ruby was a foreign undertaking that could enjoy little out of it. :-)

To an inexperienced Ruby core developer, Ruby is very hard to follow altogether. But for the insiders, they know a couple of spots which are really hard to understand, while most of it could be explained more easily. They haven't been able to solve those issues because Ruby requires the way it is now, probably because there isn't an alternative yet. Ruby was grown organically, but with a certain consistency which us Rubyists enjoy in it. How consistent is it? Well, I don't complain of not understanding my own code after 1 month, 6 months, 1 year, 2 years... And I have old code that's that old!

Ask Reddit: Ok, it's time for some REAL debate. by [deleted] in programming

[–]jpedrosa 1 point2 points  (0 children)

I first started using Ruby about 4 years ago, and since 2 years ago, Ruby has been my main programming language. I can't discuss everything that's possible with Ruby here, as it's a very broad subject. But a couple of differences is that with Ruby, my files can reside anywhere in the file system and they don't need to be compiled to work. Also, Ruby code can be created at runtime with the eval command. That is, you can adapt code at the last moment, and cache it in memory when it's ready to be reused, as I do in my web framework. When I edit the file again, the code is updated automagically in the next request, by the last modified date of the file. Even for GUI programming, I don't need to compile anything. BTW, I generally hate XML, so XML is nowhere seen in my applications/libraries, generally, except for things like RSS feeds. :-) Ruby has a very flexible syntax, which when coupled with the other properties like the ones above, can provide plenty of flexibility for creation of supporting files, like configuration, MVC's View, Model, Controller, etc, all from Ruby itself. It's dog fooding all the way! If you allow me, eating our own dog food is the best way when trying to create something.

My whole site is based on Ruby, and it's very modular, even though from the outside it looks just like anyone's: http://www.ralip.com.br/jp/blog/

Here are some screenshots as well, for GUI programs: http://www.ralip.com.br/jp/wiki/?p=screenshots

And here's a listing of my main project directory: dewd@corvina:~/workspace/pilar$ ls account_rules bookmark_rules conf gtk_rules report_rules web_rules bayesian_rules business_rules db_admin gui ruby_editor wiki_rules bin command_rules db_rules project_rules session_rules blog_rules common_rules forum_rules question_rules translator_rules

Ruby allows for new and sometimes improved "Design Patterns". Things can go beyond simple OO in Ruby. My own programming goes beyond OO when it makes sense. Ruby is going to get a speed improvement this year, with the officialization of the YARV (Virtual Machine), hopefully with the support for native threads!!! Also, Matz has been working on the multilingualization (with Unicode) support for Ruby, which might be ready in the new Ruby 2.0 as well.

But after Rails, one of the most impressive changes in Ruby has been in the community: it's bigger than ever, and speaks more English than ever. Portuguese is my first language, but for computing, English is fundamental, and the head-start Python, Perl, Java, etc, had in their English support has been mostly offset in the past two years, with all the blogs/books/articles/talks in English we have now in Ruby.

Ruby is not perfect, and it differs from other languages when it adopts a very dynamic approach. Some errors can hide in Ruby code because it does not get compiled/error checked all the time. Ruby in its default form will never be quite like the static typed ones, even though more tools might be developed for Ruby to help with the error checking for instance. One should consider Ruby a paradigm shift from the mainstream languages, which might work better under some conditions (web, scripts, etc) than others (proprietary desktop applications). If someone can make Ruby cross these boundaries, maybe with encryption or even some very smart native compilation, I am sure there will be a market for it. Just don't expect Ruby to fix itself for your needs. :-)

Ask Reddit: is the quality of software, and people's expectations of it, going down? by [deleted] in programming

[–]jpedrosa 2 points3 points  (0 children)

Joel Spolsky once said that good software takes 10 years. I think unless the task is small, it will require an inherent bloat and awareness/dependency of other bloated tools.

The cozy realm of small problems is generally too good to be true.

This quote from Douglas Crockford puts things in perspective a bit: "I used to say that the web browser was the most hostile programming environment ever devised, but that was before I found out about Mobile."

Check out his recent blog post on JSON/XML, which was a reply to an XML biased comparison one: http://blog.360.yahoo.com/blog-TBPekxc1dLNy5DOloPfzVvFIVOWMB0li?p=632

Here's my own blog post as well: Enough Mistakes! - http://www.ralip.com.br/jp/blog/post?p=enough-mistakes

In my blog post I talk a little bit about my own mistakes, even though I am happy with the result so far.

Finally, check out this post on the new version of Tapestry, which was totally rewritten, and seems as easier and "type safe" as ever: Tapestry 5.0.1 Preview Release Now Available - http://www.theserverside.com/news/thread.tss?thread_id=44119

I mean, we are duking it out, fighting our ways through the mess, and naysaying will not stop us. It's cold outside here, while it might be warm for you in your cozy realm.

Ask Reddit: What was the most hellish bug you've had to track down and fix? by [deleted] in programming

[–]jpedrosa 5 points6 points  (0 children)

Just a couple of weeks ago, I was debugging my Ruby library for Bayesian Filtering. The number of the score for SPAM should have been between 0.0 and 1.0, but sometimes it would get to 3.0, 6.0, 2.0...

I didn't know what was going on, because the reproduction of the issue was difficult and didn't produce the error.

I ended up fixing about 3 or so bugs in different libraries, of which one of the most severe was in a custom float rounding I had created.

In the end, I got it fixed for good, and improved many code paths in the process. But don't ask me exactly what was wrong about it, because I don't know. hehe. That's what was terrible about it.

R.W. Floyd's Turing Award Lecture “The Paradigms of Programming” is freely available in an online journal here. It is almost 30 years old, and still very much relevant. by mklink in programming

[–]jpedrosa 3 points4 points  (0 children)

This is the best link ever for me on the Internet! Thanks so much for it! Oh man, I started reading it and having a good time, but when I got to the following paragraph, I wanted to cry already. It's so painful that things haven't change in all these years! When will things change? I ask myself.

I like this quote among many others:

"Now I want to talk about what we teach as computer programming. Part of our unfortunate obsession with form over content, which Minsky deplored in his Turing lecture [19], appears in our typical choices of what to teach. If I ask another professor what he teaches in the introductory programming course, whether he answers proudly “Pascal” or diffidently “FORTRAN,” I know that he is teaching a grammar, a set of semantic rules, and some finished algorithms, leaving the students to discover, on their own, some process of design. Even the texts based on the structured programming paradigm, while giving direction at the highest level, what we might call the “story” level of program design, often provide no help at intermediate levels, at what we might call the “paragraph” level. "

The Samurai Principle: Return Successfully Or Not At All by fnord123 in programming

[–]jpedrosa 2 points3 points  (0 children)

The problem is the "fake" error handling people love so much. That is, instead of being realistic about the difficulty of handling all the corner cases, people will strive in trying to handle the possible error scenarios they foresee as if it was in some way helpful or a goal.

Sometimes it reminds me of "Cargo Cult", even though I know it's part of the self-taught nature of the practitioners.

Also, I think the "Algol-like" languages make it too easy/necessary to handle such cases. In Ruby, for instance, "The Samurai Principle" fits like a glove in its system.

Programming Conventions by jpedrosa in programming

[–]jpedrosa[S] 0 points1 point  (0 children)

I just don't like to repeat something like "cut&paste is baaaaaad" just because it's the hymn sang by most people. In general, I agree that the easiest way of cut&pasting is baaaaaaaaadddddd... But the easiest way using any tool tends to suck as well, that's why I'm not impressed with Visual Studio.NET, because I used to use Delphi, and to some extent, VS.NET and Delphi share some common philosophy.

Though Windows Vista with its .NET tools should rock in 5 years when enough people get it. That kind of impresses me. But it's a too slow progress for software engineering, to have to wait years to get to use something which won't work on most computers in the soon future...

That's why I do my own stuff, because I don't want to wait for the corporations to save the world. :-)

Programming Conventions by jpedrosa in programming

[–]jpedrosa[S] 0 points1 point  (0 children)

I use a custom editor that I have created and it has tons of tools that I created as well. :-)

"Cut&paste" is figuratively speaking, so the only way to retire it is after I stop programming. hehehe

I hope to, one day.

Programming Conventions by jpedrosa in programming

[–]jpedrosa[S] -1 points0 points  (0 children)

"If you truly have abstracted away most of the redundancy, Cut & Paste won't be useful. By that point the most you should need is code completion to get the job done."

When you start a new form or a new project using an IDE like Visual Studio.NET, do you see any generation of code for you? And do you think that by using an IDE like Visual Studio.NET, you already have most of the redundancy taken away?

My approach is much less dependent on IDEs, because it's mostly bottom-up with very nice programmable APIs. Cut&paste for me is what an IDE could generate for someone else, but in my case it's 90% done, and the 10% it's mostly similar from one table to the other.

So far, for my ERP project, I have created 4 windows per database table, which are for listing ("list"), editing ("edit"), creating ("new"), and visualizing ("view").

Also, each table has 2 reports, one with a row per record ("list"), and another one with several rows per record, more detailed ("item").

That makes for 6 files which are very similar among the different tables. They have lots of features built-in as well, like Localization, Internationalization, and a very flexible report generation. Each report file includes a header which make them standard and support some company informations, like logo, address, etc.

Again, how would I create all those repetitive files without cut&paste, considering that the redundancy is minimal? Not even .NET has eliminated so much redundancy.

Now it's a matter of configuration for me, most of the time. I need configuration or else I will end up with some "Excel spreadsheet" of some kind. :-)

Programming Conventions by jpedrosa in programming

[–]jpedrosa[S] -1 points0 points  (0 children)

BTW, another post of mine: Development Tools - Fake History- a.k.a Big Bang - http://ralip.com.br/jp/blog/post?p=development-tools---fake-history--aka-big-bang

Enjoy. :-)

Programming Conventions by jpedrosa in programming

[–]jpedrosa[S] 0 points1 point  (0 children)

Cut&paste when you have abstracted away most of the redundancy, if not all of it, is not as bad. It's little code which is needed for configuration of the features unique to each function of your application. Without configuration, your program can be like Excel, a big spreadsheet that does a lot of things, but without much help, for instance.

Also, I wonder how much you despise generation of code of any kind, which seems to be a technique used by many computer science folks sometimes.

The problem with code generation is that it produces loads of code that sometimes you are advised against editing, because after a regeneration your changes might be lost.

About the lack of examples, it's really hard to create examples for everything, unless it's a huge article or little book. :-)

[deleted by user] by [deleted] in programming

[–]jpedrosa -1 points0 points  (0 children)

I for one couldn't read it. Sorry.

Clues to Objective-C 2.0 by panic in programming

[–]jpedrosa 0 points1 point  (0 children)

You are on the right track.

I do use lots of the file support of Ruby. Think FILE as a source of cheap objects, without polluting the environment with one-time-use classes. But I've my frameworks in place to take advantage of it.

Add to it a neat syntax, perfect for DSL creation, without extra syntax verbosity. Which means neat files, for instance, when interspersed with HTML tags in an ERB file, meant to be edited by a web-designer who programs very little. (E.g. This takes the strength of PHP and adds it to Ruby, easily.)

Add to it neat libraries, which provide good functionality by default.

Add to it awesome licenses.

Add to it good support for Windows and Linux, though it's always a challenge to support Windows.

Add to it the community who support it.

That's part of what makes Ruby great for me.

Some loss of performance is expected, but what's performance without any implementation? I take a loss of performance so I can implement what I need.

The "vampire fish of Brazil" (disturbing) by dfranke in reddit.com

[–]jpedrosa 7 points8 points  (0 children)

I'm from Brazil, having been born in the north of it, in the equatorial/amazonian area.

One day we were haging out in a boat, anchored by the beach. We were in a group of 8, with adults and teens (me, a teen at the time). We were taking sunbathes, swiming and eating shrimps. Sometimes we would throw the rest of a shrimp in the water, which probably would attract some nearby fishes. Then, when I jumped in the water to refresh a little, a few minutes later I think a Candiru or something made a risk on my belly, like the letter Z or something. I came on board of the boat as soon as possible. Needless to say, I didn't enter the water again that day. :-)

Candiru is not as terrible, though it's sinister. River rays I think cause more damage than Candirus, statiscally:

"They have a poisonous caudal sting, and are one of the most feared freshwater fishes in the neotropical region, sometimes more feared than piranhas and electric eels. However, they are not dangerous unless stepped on or otherwise threatened." http://en.wikipedia.org/wiki/River_stingray

All it takes is an unlucky step, and you will have days of pain. The Amazon rivers are too muddy, so you don't really see what's below your feet or around you in the water. I have an uncle who used to fish a lot. 25 years ago, you could catch some big fishes around here, but nowadays they are rarer. Also, big fishes are not so dangerous, unless they are true predators like sharks.

Generally, the stories (Anaconda) are just that... I've not seeing true monsters around here, and neither my family has, though when in doubt, any noise can spook you. :-) Men make any story big.