Forums

New in forum

General discussion about Cobra. Releases and general news will also be posted here.
Feel free to ask questions or just say "Hello".

New in forum

Postby fraya » Thu Apr 02, 2015 8:19 am

Greetings, Cobra programmers.

This is my first post, so please let me introduce myself and explain my impressions on Cobra.

WARNING: Long post (non native english) OMG!

TL;DR Was a programmer, still my passion. I like Cobra. I would like to help.

My first real job was as a Java programmer in the Javabeans, EJBs era. We used IBM VisualAge (made in Smalltalk!!). Java never convinced me, because years before, in university, I knew the Eiffel language, which was better (in my opinion) to Java and C derivatives. After 5 years I changed my job to teaching and I have more free time, as you will see by the extension of this post.

I found Cobra through Mono platform. Some good points are:

  • The “pythonic” syntax is clear, no strange symbols, natural for algorithms and teaching.
  • In Cobra you don't need to put a semicolon in blocks like in Python.
  • No 'self' is needed in every method like Python.
  • Cobra has uniform access. The access is the same no matter if it is a variable or a calculated value.
  • Preconditions, postconditions, invariants. Important for me. Used with abstract classes or interfaces makes not only an API but a
    contract.
  • Interoperable with .NET / Mono.
  • Static typing.
  • Generics. A must. See complaints to Golang about generics in blogs.
  • Good performance.
  • Not hyped :D

The first time I tried Cobra, I didn't catch it. I use Linux. I'm not familiar with .NET/Mono ecosystem. A lot of FUD against Mono. The
documentation was difficult to read (sorry). I miss an API with all the methods of core classes like the one that is generated with
`-doc` for every class (and with preconditions, postconditions and invariants included like part of the documentation).

In 2014, I remember looking in Google code jam's the submissions made by nerdzero (hello, well done!). Cobra's code can be easily understood without knowing Cobra!, is pseudo-code!. It's like a scripting language but with static typing.

So I'm trying Cobra again. I resolve problems of bio-informatics in [url]rosalind.info[/url] just for practice. I made the first problems in
different languages to compare them. Cobra problems are usually shorter in code, faster execution. The code is better in the sense
that has an specification with it. I only did that with the other languages in an informal way (just in my mind). If you have a look to
some problems in Rosalind you will see how easy the specification of the problem are mapped into Cobra with preconditions, postconditions and the test sample in the same method.

Cobra is a mix of good things but none of them are revolutionary. The advantages of using it are only visible after a period of study
and education. Only with a big enough codebase and years of supporting the same project, things like design by contract, static typing or clean syntax are noticeable . Quality sometimes is boring, only pays in the future and a lot of times can go unnoticed.

I don't see any real problem in Cobra, only small details that can fulfilled with the help of the community. I offer my humble help to
improve the situation. We are fortunate to have a tool with (let's say) 60% of features of a professional product that costs thousands of dollars.

Sorry for this loooong post. Thank you for your attention
fraya
 
Posts: 7

Re: New in forum

Postby nerdzero » Sat Apr 04, 2015 7:55 am

Welcome, fraya!

In 2014, I remember looking in Google code jam's the submissions made by nerdzero (hello, well done!).

Haha, thanks :lol:

I don't see any real problem in Cobra, only small details that can fulfilled with the help of the community. I offer my humble help to
improve the situation. We are fortunate to have a tool with (let's say) 60% of features of a professional product that costs thousands of dollars.

Cool, any place you are interested in more than others? Documentation, as you found, could always use some love.
nerdzero
 
Posts: 286
Location: Chicago, IL

Re: New in forum

Postby fraya » Sat Apr 04, 2015 11:13 am

Cool, any place you are interested in more than others? Documentation, as you found, could always use some love.


  • Create a linux package with opensuse open build service. One source, multiple packages 4 distros, in theory. Not sure, Cobra is really easy to install.
  • Data structures with contracts. Use the book Algorithms and data structures: design, correctness, analisys to create some structures in Cobra.. The only author I know that use Eiffel in examples, also the creator of Lout publishing system.
  • I'm open to other (more useful) ideas.
fraya
 
Posts: 7

Re: New in forum

Postby nerdzero » Mon Apr 06, 2015 7:32 pm

I think those are both good ideas:

fraya wrote:Create a linux package with opensuse open build service. One source, multiple packages 4 distros, in theory. Not sure, Cobra is really easy to install.

Never heard of the open build service before, but if it gets me a Cobra deb I'm all for it.

fraya wrote:Data structures with contracts. Use the book Algorithms and data structures: design, correctness, analisys to create some structures in Cobra.. The only author I know that use Eiffel in examples, also the creator of Lout publishing system.

This would probably be more fun, easier, and a good way to exercise the compiler and possibly improve the docs.
nerdzero
 
Posts: 286
Location: Chicago, IL


Return to Discussion

Who is online

Users browsing this forum: No registered users and 2 guests

cron