Latest Entries RSS

Guest blog: Programming Philosophies

Posted on February 15th, 2012 by Community Team
Category: Opinion

[[ Today's guest blog was written by Nick Robertson from the AnsiGL project. AnsiGL is a modern "graphics" API for text-based applications.

The original article, as well as other thoughts by Nick, is over here.

I was particularly struck by point 2, as I've seen so many projects burn up hundreds of hours of time rewriting things that we're already well tested in production. We all have a desire to rewrite - it's part of the programmer mindset - but sometimes it's just a waste of time. Consider reusing libraries (like Boost, as mentioned in the article), or refactoring what you already have, rather than scrapping and rewriting from scratch. --Rich ]]

As I’ve been working on AnsiGL, there have been a few simple “rules” that I’ve been following I go along. Most of these things are probably old concepts to most of you, but hopefully these will help provide a little bit of insight for any up-and-coming programmers and for anyone who might contribute code to the project. I feel it’s important to share some of this not only for better understanding of the code in the project, but also to make sure that any potential developers can strive for the same basic goals. If nothing else, it might help answer why certain things were done the way they were done.

1. Let the compiler do it.

The single biggest rule that I have is one that anyone who has taken a programming course of any kind can tell you: KISS (Keep it simple, stupid). Anytime you can, let the compiler help you generate code. This is the biggest reason for settling with C++ (as opposed to C, for example) as well…for the reduced amount of code that I have to generate thanks to OOP and templates. Reliance on the compiler as an assistant programmer (sort of) essentially allows well-tested code to take the place of something I could otherwise screw up, while still allowing versatility. Not to mention, there’s much less code to test/debug.

2. Previously tested code is better than generating something from scratch.

I’ve also come to really appreciate things the Boost libraries…peer-reviewed code, pre-tested, and I don’t have to type it out myself to boot. Anytime there is another library that meets the requirements (without stepping too far outside the scope of the project…as was the case with most Unicode libraries I reviewed), it should be, at the very least, strongly considered for use in the project. There’s no need to solve problems over and over again unless the needs of the project dictate otherwise.

This “rule” has actually served a dual purpose for me. The above is relatively obvious…the second is that it really makes me think about a particular problem and what exactly needs to be solved. I end up reviewing multiple viable solutions in the process (ie, looking over other libraries that do what I need) and in many cases, I simplify my design. Sometimes the reason is because of interface demands and other times, I was simply thinking about a problem the wrong way.

3. Unit testing is your friend.

It may seem like lots of extra work (and it is), but the payout for the effort is rather large.

For those unfamiliar with the concept…a “unit test” is when a programmer isolates a single “unit” of code, and creates a program with the sole purpose of testing that “unit”s functionality.

AnsiGL is now full of examples of unit tests…even though they were written in haste and are buggy themselves sometimes. I decided to use each class as a “unit” for my purposes, so each class has its own test function. The sole purpose of that function is to test the class’s functionality…usually by manipulating the class by its member functions and verifying the results with expected (hard-coded) values.

This may all seem pointless since these tests don’t really amount to anything in the final product, but when adding new features and debugging, it’s absolutely priceless to be easily able to find what would otherwise possibly be intermittent or hard-to-find bugs. In short, I can essentially run this test application and it will tell me which functions are not performing as expected. This has reduced my overall development time a considerable amount.

Another benefit of creating these tests, is that you get to create your class interface in a somewhat “real” scenario. When designing an interface to your class, it’s rather important to know exactly how you need to use it, how you’d like to use it, and how it must be done…making a unit test forces you to think most of that out well before you make the time investment in lots of code that “doesn’t play well with others”.

4. Less is more.

If you can solve a problem with less code, that is typically the “correct” solution. Anytime I end up solving a complex problem, I almost always think of some way to improve it later on. If that “improvement” ends up being more code for roughly the same functionality, it is almost always the “wrong” answer simply because there is more code to maintain. There needs to be significant improvement (this varies from problem to problem) to justify complex code.

Something I’ve noticed in lots of code out there, is that programmers will program within certain paradigms, just because it’s slightly more efficient for the compiler (for example, ++var instead of var++ in a for loop). In my opinion, there are certain times it does make sense, but most often you should make it simple and easy until the code profiler tells you that it’s a bottleneck. Don’t program around compiler issues (unless it’s simple, like the above example) until it actually becomes a problem, because it can needlessly complicate code! Complicated code is a pain in the ass.

Comments (1)

The Anvil Podcast: CamProcessor

Posted on February 14th, 2012 by Community Team
Category: Community Showcase, Podcast

[image]Rich: I recently spoke with David Webber, who works on the CamProcessor project. Although the CamProcessor website describes it as an “XML editor, validator, and designer”, it does a lot more than that, as you’ll hear in David’s explanation of what he does on the project, and how the project got rolling.

If the embedded audio player below doesn’t work, you can download the audio in mp3 and ogg formats.

And it seems worthwhile to remind you that the music used in the podcast was generously shared with us by the Arianne project.



You can subscribe to this, and future podcasts, in iTunes or elsewhere, at http://feeds.feedburner.com/sourceforge/podcasts, and it’s also listed in the iTunes store The music at the beginning and end of this recording is used by the generous permission of the Arianne project.

screen-shot-2012-01-11-at-125643-pm David: The problem space is one that’s been with us for a long while. I got started into this in the old days with EDI, when I first came to America, so I’ve been looking at this for over 20 years. I was one of the first to see the connection between XML and what the EDI world was doing, and we started the XML/EDI work, and that led to what we have today, with all these XML exchanges, schema, XPath, XSLT, and all these other related technologies. So in the middle of this I realized that we still weren’t answering the mail in terms of what business information exchanges need.

There’s an awful lot in XML to do with documents, graphics, web media, all that other stuff. Business transactional exchanges are somewhat of a world to themselves, in terms of … you have these very high volume transactions, you have hundreds, and potentially thousands of transaction partners, and so you have to align, and get the interoperability right.

I’ve done an awful lot of standards work both in the EDI world, and then more lately through OASIS, and in industry groups with XML. So the need to have an answer for these business communities is really what we’re focused on.

And we like solving tough problems. Everybody does. You go out there and somebody says, you can’t process a schema with XSLT and produces XML, so of course, that was the challenge.

It took us about two months to get that working and that really opened up Pandora’s box. So now we can read in any existing schema, create the template … so that’s the bottom-up approach. People didn’t have to reinvent their schemas. They could just drop them into the tool, and then boom. Now you can run interesting reports, you can diagnose what’s in the schema, find bugs. You can rewrite the schema as kind of a flattened schema, because some of these collections are really complex and will cause issues in middleware. You can create mind map models which are great for people to look at and understand what’s going on. And you can create dictionaries, spreadsheets. You can compare what’s in the schema to a dictionary, all all these other things we started adding.

You can create test cases, so you don’t have to do that by hand.

Because we have the logic in the template, we can do a lot better job of creating XML test cases than, say, an Oxygen, or an XML Spy, or a generic editor.

screenshot

So that then led into us being able to create test suites for you, so now we have that. You can download the package that we have, install Ant on your system. Now you can run hundreds of test cases through the validation engine at the click of a button.

We’ve really created a very rich environment for people developing XML exchanges. What happened was that were … I particularly was involved with a US government project. I found out about this thing called NIEM - National Information Exchange Model - that the government’s using. So we put a lot of features into the toolkit to support that approach. And that’s really helped all aspects as well, not just the NIEM, but it’s very far horizontal, too. You can apply these validations and checks to your regular work - it doesn’t have to in NIEM to be really helpful.

So, stupid things like, being able to spell check the XML element names within the schema. We can do that for you. Checking, if you said it was a date, that it has a date definition on it. Consistency things like that.

Then Oracle came along and said, we really like this. We have a lot of customers that want to do NIEM, and we want to help. So they took on sponsoring the project, and provided developer resources, and that’s allowed us to really up the ante now in terms of what we’re doing. Now we have the drag and drop editor, so now you can take dictionary components from your domain, whether it be industry or government, and drag and drop those in, and actually build an exchange. That’s really powerful. SO now we’ve gone from bottom up all the way to top down.

Once you’ve built your exchange you can generate models, either mind map, or, now we’re doing UML. So now we have that piece as well.

So that’s where we are today.

We have a lot of plans for new stuff that we’re looking to do. We’re about do to a bug-fix release. We’re waiting on a few last-minute tweaks to XSLT That I need to do.

Which comes back to the other point you were making, which is that we’re very open on the project to people. Because this thing is based on XSLT and Java, it really is able to support other people contributing.

They look at, say, some of the reports that we have, or some of the handling we’re doing, and say, it would be really nice if we had this. Then they can just download some of the sample XSLT that we’ve got, follow that lead, and build out what they need.

And particularly if you’ve got a lot of XSLT skill, you’re going to really take to this quickly, I feel, because it’s so easy compared to working with the raw schemas.

Just to give an example, we were working with the folks at NIST, and they kept saying to me, we’d love to have models. We’d love to be able to do UML, and I kept saying, it’s too tough. And I had one of those aha! moments, because I picked up FreeMind. I saw their XML. A week later, Friday morning I woke up, and I thought, you know, I could write that with CAM and some XSLT. Four hours later, I had it working. Another eight hours on top of that, and we had all the Java integration working.

Now you can download Freemind, go into the editor, configure it in your preferences, hit the button, and it opens Freemind and puts your mind map up there of your mind map model. Then I got the UML working.

This is what it’s all about.

I think it’s so exciting now, because compared to 10 years ago, doing this stuff with tools - all kind of programming tools - is so much faster than it used to be. That’s the big thing that we’ve seen in the industry.

We have taken advantage of the SourceForge wiki media, and created a really nice page there for people. We’ve got an online eight minute video the folks at Oracle Media produced. If you want to know what’s it all about, and you’ve got eight minutes and can watch a vid, that’s going to just do it for you. I really recommend that people go to the site. We have it at cameditor.org, which goes to the site. You’ll see ‘Media’. Go down to ‘Tutorials’, and you’ll see the eight minute video.

Rich: Thank you so much for your time.

David: Cheers. Bye for now.

Comments (0)

Featured Projects - February 13th 2012

Posted on February 13th, 2012 by Community Team
Category: Community Showcase

This week we’re featuring a couple of games, a couple of video applications, some developer tools, and a financial application. We’re proud to be hosting these fine projects.

[image] Code::Blocks

Code::Blocks is an open-source cross-platform IDE (Integrated Development Environment) for C/C++.
Designed with flexibility in mind, most of its features are provided by external modules (plugins) making it easily extendable and configurable.

[image] SharpDevelop

SharpDevelop is an open source IDE for the .NET platform. It is entirely written in C#, and supports various project types in multiple programming languages.

[image] Battle for Wesnoth

The Battle for Wesnoth is a turn-based strategy game with a fantasy theme.

[image] Bitcoin

Bitcoin is a decentralized P2P electronic cash system without a central server or trusted parties. Users hold the crypto keys to their own money and transact directly with each other, with the help of the network to check for double-spending.

[image] SmartCam

SmartCam - Smart Phone Web Camera - Turns a camera phone (S60, WinMo6.x, Android, Samsung Bada) with bluetooth or WiFi into a handy webcam ready to use with your PC

[image] 4k Download

4k Download is a free, open source and cross-platform video and audio downloaders written with C++, boost and Qt. YouTube, Vimeo, Facebook, Dailymotion, Metacafe and other video-sharing services supported.

[image] FlightGear Mac OS X

FlightGear Mac OS X is a Mac version of FlightGear, a multi-platform open-source flight simulator that provides very realistic flight experience on your computer. By installing a package you can fly around the world in the comfort of your own home.

Comments (0)

The Anvil Podcast: TurnKey Linux

Posted on February 8th, 2012 by Community Team
Category: Community Showcase, Podcast

[image]Rich: This is Rich Bowen. I’m speaking with Liraz Siri. Liraz is involved in the TurnKey Linux project.

If the embedded player below doesn’t work for you, you can download the audio in mp3 or ogg format.



You can subscribe to this, and future podcasts, in iTunes or elsewhere, at http://feeds.feedburner.com/sourceforge/podcasts, and it’s also listed in the iTunes store The music at the beginning and end of this recording is used by the generous permission of the Arianne project.

Rich: Can you tell us what this project is about and how it got started, and what sort of images the TurnKey Linux project offers?

Liraz: A few years ago … three years ago, we noticed that there was increasing proliferation of Linux-based open source software - really great stuff - that most people we worked with had no idea even existed. And those that did … if we mentioned that, well, there’s a great piece of software for that, a lot of people will talk about, well, it’s going to be difficult to set up, or we tried that, and there was an issue, and I gave up.

Now, experts didn’t have this problem. They had a lot of experience. Even though you might be expert with one application and then you run into issues with another, and it’s just not worth the bother so you never evaluate it. And it might be perfect for the solution your’re trying to resolve.

So we were back then developing development infrastructure to put together pre-integrated Linux solutions for something else - an entirely different commercial application. We thought, wouldn’t it be neat if we took this, and used the development infrastructures to start creating pre-packaged Linux solutions for the most popular software. That was how it started - basically trying to take the expertise that would go into putting together really good Linux systems by someone who knows their doing, and glue together components that make it easier for someone who doesn’t necessarily know a lot about Linux system administration, to get things done - to get on the ground running very quickly.

Our first appliances were very basic. We did three solutions: LAMP stack, Drupal and Joomla, which are management systems. They’re very popular. And it turned out that people like the concept, and they started giving us feedback and a community started forming around the project. And we gradually introduced more solutions and updated, added new features. And eventually we got to the point where we have a library of 45 solutions which we’re now working on expanding to over 100 solutions for the next release.

That’s pretty much how the project got to the point where it is today in terms of the virtual appliance library.

boot screen

There’s also some innovation on the side of … how do you … let’s say you want to start an online shop. The first step is deciding what sort of online shops software is right for you. There’s various solutions, and what we’d like to do is be able to take you from the very first stages, where you don’t necessarily know what sort of software to use, so you can evaluate the different solutions, and when you find something that’s right for you then you can very easily deploy it to the cloud. We have some features to make that much more easy than it would be with a conventional Linux system. It’s called Turnkey Backup and Migration, and it allows you to do completely automated backups and then completely automated restores, to pretty much anywhere. So you can back up a system that’s running in a virtual machine, and you can restore it a server running on real hardware, or a server running in the cloud or on the other side of the world.

That’s pretty much TurnKey in a nutshell.

Rich: I noticed that there appears to be a commercial venture that’s attached to this as well. Can you tell me something about that?

Liraz: About a year and a half ago people started talking about deploying TurnKey in the cloud. They wanted to see support for TurnKey at their favorite VPS providers, or cloud platforms. It used to be pretty difficult to do that. So we started working to see … well, it’s great if you can install a Linux system just locally, but that sort of limits your options, because most people don’t really run server software at their home. If you really want to move it into production then you’re going to want to host it somewhere. And you want to have support for hosting platform for the solution.

So we started looking for options and it turns out that Amazon, at the time, had a really good cloud infrastructure service. That made it very easy for us to plug into their system, and start offering our users the ability to deploy these solutions on Amazon. Initially we created Amazon machine images and tried letting users deploy them themselves, through the regular Amazon Web service tools. That turned out to be difficult. There were all sorts of issues.

If you’re setting up a machine on the Amazon cloud and you have to set up firewall rules and have to … you can’t have a default root password because the system is very insecure, so you’re using SSH key authentication … there are all these small issues, that, again, aren’t problematic for an expert, but somebody who isn’t an expert gets entangled in that.

So we created the TurnKey Hub, which streamlines the whole operation, and makes it very easy for you to get started using Amazon cloud - things that would’ve previously been rather difficult. As part of doing that, we also created a business model for TurnKey.

Most of the things that the TurnKey Hub provides are basically free. The service provides backup and migration - that’s completely free. We don’t make any money off of that. Dynamic DNS services, free monitoring. All that is part of the free service. But right now, it’s only cloud deployment. Say you want to deploy a server in the cloud, then we have basically two options where you you can decide if you want to pay a 10% remium to deploy your server. You pay 10% extra on top of regular Amazon Web services fee. Alternatively, we have a different plan allows you to pay a fixed rate monthly fee and then there are no premiums on usage fees.

We also provide a higher-end version of that plan that also includes support for businesses that want that kind of commitment.

That’s basically the first commercial offering that TurnKey is offering. In future we might expand that.

Right now we’d like to focus on expanding the number of solutions we provide. Also doing things like supporting Debian and supporting 64-bit which has been on the list for a while. There have been some infrastructure issues with that, but we’re finally going to solve in the next version so people can use this for higher-end applications as well. Even though that really hasn’t been a big problem up until now because most of TurnKey users have been on the low end, but once you start getting serious you want 64-bit support. That’s something we’re going to be releasing in the next version.

For an Open Source project, the community is, maybe, if not the most important aspect, one of the most important, because if you don’t have a community, then, why not be a proprietary project and have all the advantages of being able to sell your software? Why give stuff away and not have people participate, and feel they’re involved, and that this is something that they can contribute back to?

It’s really important, in our belief structure, to have people involved, and have people feel that TurnKey is something they can contribute back to. There are a few ways that users contribute right now. The easiest way is to participate in the community forums. We have community edited documentation, and our bug-tracker, and a blueprint for people to suggest features and discuss what they’d like to see in the next version, which is great.

The next level of contribution after that, which requires a bit more involvement and actual development: Right now we have a software development kit called TurnKey Linux Patch - tklpatch - we made it very easy for users to take any appliance and customize it to their kneeds. We have a core appliance that is the lowest common denominator of all our appliances. It has the basic features. The web interface. The backup and migration capability. It’s actually one of our most popular appliances, because a lot of users are taking that, and they’re just tweaking that fit their needs. Some of them are going a step further and posting their contribution back on the website, so we can discuss them. Most contributions are going to make it into the next release as new appliances, and from then on Turnkey Linux maintains that as an additional appliance.

There’s a big benefit. This is basically the advantage of Open Source in general. If you contribute back to the community, then you have to do less work in the future for yourself, because you have people who with you, and making your specific use case better, because that’s also something that are interested in.

One of our goals for this year is to take the development infrastructure that is powering Turnkey and make it public, and make it very accessible. Right now there’s the software development kit, but we want to make it possible for people to develop TurnKey appliances basically the same way we do, so this project doesn’t rely so much on our core development team, and anybody can contribute at any level.

Right now, the of source code to the appliance is public, but the fabrication system that takes that source code and assembles appliances from various package repositories - that’s something that right now we’re cleaning up, and we’d like to build an interface so people can roll their own, at the same level of the same tools, with the same power, that we have.

We’re hoping that once we do that, then can really release the labor bottleneck that has been limiting what we can do. When you depend on a small core development team everything have to go through us. We can expand to many a hundred or a hundred and fifty appliances, but there’s potential for so much more. Especially when you get to client-side applications.

There’s a ton of good client-side applications. Right now we’re only doing server-side applications, but in the next release will be releasing TurnKey client side appliance. Sort of a TurnKey appliance core, which we’d like to see as a basis for then a whole range of client-side applications. We don’t even know, necessarily, what sort of applications are going to be eventually successful. People are going to be really interested in, even though there are few that are probably obvious, such as rescue disks, kiosks, stuff like that, and maybe privacy distributions. Who knows? Once you get the tools out there, and people can use them freely then you can just let innovation happen. And then things that people are interested in, they’ll flock towards.

We want to create an ecosystem. An infrastructure that is completely open-source, where people can feel that they belong and contribute back to. TurnKey can get to the point where it really lives up to the potential we think this approach has.

Rich: Thanks so much for talking with me. I wish you a whole bunch of success with your project.

Liraz: We’re really excited. It’s been a lot of fun so far. Thanks for having me. I hope your listeners check out our website and maybe try one of appliances, then tell us what they think.

Rich: Thanks so much.

Liraz: Bye bye.

Comments (3)

WinLock Pro

Posted on February 7th, 2012 by Community Team
Category: Community Showcase

[[Today's guest post is by Rojitha Goonesekere, the author of WinLock Pro. Rojitha is in Sri Lanka, making it very difficult to schedule a time to speak with him when we're both awake.]]

WinLock Pro was inspired by Windows 8. After the release of the Developers preview, I was immediately drawn towards its simplicity and beauty. The new and improved metro interface to all the minor changes caught my attention. Something that really won me over was the excellent Lock Screen and login interface that Windows 8 provided the home user, a simple and easy way to access your PC at any time without any trouble. I was browsing online one day and realized that there were a countless number of blogs and forums dedicated towards this topic. And I immediately thought of bringing this experience all the way to Windows 7.

WinLock Pro

WinLock Pro was initially created as a “themeâ€, a way to enjoy a different look. I was not targeting the software to provide any “security†to the PC but merely just make it look good. But after releasing a few versions of the software I realized I could not only provide a different look to the usual operating system but also provide good security in the process. The first security modules were added in Version 4 and I kept developing these modules over the next versions of the software. The modules created did not provide “top class†security but it did stop intruders from accessing your personal files anytime soon.

Since security and privacy is something that everyone is concerned now, the main target is about developing these security features and providing the user with a safer experience. I am looking for developers who are experienced in this field to help me out with this project and hopefully make WinLock Pro an essential utility on any computer. I am also hoping that when the project is more stable; I could be able to replace the entire Login screen of Windows 7 with WinLock Pro.

If any developers conversant in VB.NET are interested in the project, they could contact me at any time, engage in discussions on SourceForge.net and start working on it. I hope that together we can create a more secure environment for everyone to use and enjoy.

Comments (1)



Status Terms Privacy Advertise About HTML5 Center SourceForge.JP


You are viewing a mobilized version of this site...
View original page here

Mobilized by Mowser Mowser