A few colleagues and I created a simple packet capturing application based on libpcap, GTK+ and sqlite as a project for a Networks Engineering course at our university. While it (mostly) works, I am trying to improve my programming skills and would appreciate it if members of the community could look at what we've put together.
Is this a good place to ask for such a review? If not, what are good sites I can throw this question up on? The source code is hosted by Google Code (http://code.google.com/p/nbfm-sniffer) and an executable is available for download (Windows only, though it does compile on Linux and should compile on OS X Leopard as well provided one has gtk+ SDK installed).
Thanks, everyone!
-Carlos Nunez
UPDATE: Thanks for the great feedback, everyone. The code is completely open-source and modifiable (licensed under Apache License 2.0). I was hoping to get more holistic feedback, considering that my postings would still be very lengthy.
As sheepsimulator mentioned, GitHub is good. I would also recommend posting your project on SourceForge.net and/or FreshMeat.net. Both are active developer communities where people often peruse projects like yours. The best thing for your code would be if someone found it useful and decided to extend it. Then, you'd probably end up with plenty of bug fixes and constructive criticism.
You might get some mileage by posting the code out in the public space (through github or some other open-posting forum), putting a link here on SO, and seeing what happens.
You could also make it an open-source project, and see if people find it and use it.
Probably your best bet is to talk to your prof/classmates, find some professional programmers willing to devote their time, and have them review the code. Like American Idol-esque judging, but for your software...
As #Noah states, this is not the site for code review. You may present problems and what you did to overcome those problems, asking if a given solution would be the best.
I found a neat little website that might be what you are looking for: Cplusplus.com
Related
xUnit++ isn't the same thing as xUnit, and google doesn't point me to any good documentation. The xUnit++ site has a Wiki, with about five pages of general stuff, but no real specifics and no tutorials.
Does anyone know of any relatively complete, or detailed, documentation of xUnit++. Also, if you know of any tutorials, that would be great!
Thanks!
At the moment, there isn't. I opened an issue about this on the author's homepage over a month ago. The link is here.
https://bitbucket.org/moswald/xunit/issue/13/tutorial-and-quick-start
It can be assumed that he's busy because good programmers are usually swamped.
I would suggest making a bitbucket account to comment on the issue, or asking the author to move his repository to something like GitHub, where the community would take care of the rest of the work for him.
It might be a little bit difficult because he is currently using mecurial for his version control.
Not much of an answer, but there are other people looking for the same information as you.
[Change 2016-05-10]
I started using The Catch Framework for doing unit test in C and C++ approximately 2 months after answering this question. It is fairly well documented and in active development on GitHub. It might be worth a try.
I tried out the demo application which was pretty impressive. However building it and integrating it with my own code is hard because it's such a large project.
Has anyone successfully used it for their own projects? Was is difficult to build and integrate with your own C++ code?
Link: STLab.
For the interested: there's also a Google Tech Talk clarifying the philosophical ideas behind the project.
ASL is used fairly heavily within Adobe. The layout library (Eve) is used in many Adobe products and variants of it have been in use since Photoshop 5. The property model library (Adam) got a little use in CS4 and will likely be used more in future products. I can no longer speak with certainty because I left Adobe a few months ago and am now working at Google. I still put in some time on ASL and continue to collaborate with Prof. Jarvi and some of his students on the property model library (see the paper on the ASL wiki).
It can be a bit difficult to integrate with your product. The platform libraries in ASL (backends to Adam and Eve for Windows and Mac Carbon) started as some small example code, then the community started to refine it (the Windows port was initially a community effort), then we had some ambition to make it a real, supported library. But then Apple dropped Carbon for 64 bits and Adobe's framework plans changed so we weren't able to leverage our efforts here inside Adobe. Because of this the platform libraries are a little shaky - if your code base is already using a framework you might consider integrating Adam and Eve directly (the API for both libraries is very small). There are two challenges with integrating with a framework. Eve needs good metrics to do a good layout, including things like baselines - getting that from your UI toolkit may be tough. The property model library assumes a strict model/view/controller pattern that most UI toolkits don't obey so you have to do a bit of adapting. Feel free to ask questions on the ASL mailing list. We can also help with building - it really isn't as complex as it seems.
I watched the Tech Talk.. He sort of lost me when he showed the real world example code and then a massively shorter version using his model... I suspect that his implementation, just like anything else, would in practice be bogged down by real world considerations if actually pursued to solve real problems...
That said, it was interesting... The first half of the talk was great... I especially liked his assertion that Generic programming is the mathematics of coding...
So I understand that there are a few options available as far as parsing straight XML goes: NSXMLParser, TouchXML from TouchCode, etc. That's all fine, and seems to work fine for me.
The real problem here is that there are dozens of small variations in RSS feeds (and Atom feeds too), so supporting all possible permutations of feeds available out on the Internet gets very difficult to manage. I searched around for a library that would handle all of these low-level details for me, but came out without anything.
Since one could link to an external C/C++ library in Objective-C, I was wondering if there is a library out there that would be best suited for this task? Someone must have already created something like this, it's just difficult to find the "right" option from the thousands of results in Google.
Anyway, what's the best way to parse RSS/Atom feeds in an iPhone application?
I've just released an open source RSS/Atom Parser for iPhone and hopefully it might be of some use.
I'd love to hear your thoughts on it too!
"Best" is relative. The best performance you'll need to go the SAX route and implement the handlers. I don't know of anything out there open source available (start a google code project and release it for the rest of us to use!)
Whatever you do, it's probably a really bad idea to try and load the whole XML file into memory and act on it like a DOM. Chances are you'll get feeds that are much larger than you can handle on the device leading to frequent memory warnings and crashes.
I'm currently trying out the MWFeedParser #Michael Waterfall is developing.
Quite easy to set up and use (I'm a beginner iPhone developer).
His sample code for using MWFeedParser to populate a UITableViewController implementation is helpful as well.
take a look at apple's XML Performance sample -- which points to using libXML directly -- for performance and quicker updates to the display. Which may be important if you are working with very large feeds.
Check out my library for parsing Atom feeds, (BSAtomParser) at GitHub. It doesn't care about validating the feed, it does its best at returning whatever is valid. The parser covers most of RFC 4287, even extensions.
Here's my solution: a really simple yet powerful RSS parsing library: https://github.com/H2CO3/RSSKit
Have you looked at TouchCode yet? I don't think it has an RSS processor, but it might give you a start.
http://code.google.com/p/touchcode/
I came accross igasus project on sourceforge today. I haven't used it or really checked it, but perhaps it might help.
From their site:
igagus is a web service for the iPhone that allows aggregation of RSS to be delivered in an iPhone friendly format.
Actually, I was trying to suggest you ask on the TouchCode discussion board, because I remember someone was trying to expand it to support RSS. That might be a decent starting point. But I was being rushed by my wife.
But I see now that TouchCode doesn't have a discussion board. I'd still ask the author, though, he might know what came of that effort.
This might be a reasonable starting point for you. Atom support isn't there yet, but you could help out?
This project started as a development platform because i wanted to be able to write games for mobile devices, but also being able to run and debug the code on my desktop machine too (ie, the EPOC device emulator was so bad): the platforms it currently supports are:
Window-desktop
WinCE
Symbian
iPhone
The architecture it's quite complete with 16bit 565 video framebuffer, blitters, basic raster ops, software pixel shaders, audio mixer with shaders (dsp fx), basic input, a simple virtual file system... although this thing is at it's first write and so there are places where some refactoring would be needed.
Everything has been abstracted away and the guiding principle are:
mostly clean code, as if it was a book to just be read
object-orientation, without sacrifying performances
mobile centric
The idea was to open source it, but without being able to manage it, i doubt the software itself would benefit from this move.. Nevertheless, i myself have learned a lot from unmaintained projects.
So, thanking you in advance for reading all this... really, what would you do?
Throw it up on an open source website and attach a bunch of good keywords to help search engines find it. If someone's looking for it, they'll find it and be able to use it.
I would say that you should open source it.
If you do have the time, it may be helpful for other programmers who are interested in the project to know the status of the project, and what is next to do on the project. Writing a to do list may be helpful, or writing comments in the code may also help.
If you do not have the time to write up a to do list maybe somebody is willing to take the initiative on the project, find out what needs to be done.
Look at it a different way. The worst that can happen is that your work will go unnoticed, and your efforts will be lost. The best that can happen is that you will be recognized for having the foresight to start such a great project, and open sourcing it.
http://sourceforge.net
This allows you to set up as admin and manage the project.
Of course if somebody does not agree with you they can fork the project and start their own version but that's open source for you.
If you've put time and effort into it, don't let it die a quiet death. Instead share it under the license of your choice on a collaborative site. At the worst, you get nothing in return. At the best, other people like the idea and provide constructive feedback or code. Even better is if you get some time in the future to pick it back up.
Couple of good sites to post it on
codeplex
sorceforge
Definitely, you should open source it, just make the same considerations you made on this question on a place that anybody can see...
Maybe someone will pick it up, or just learn from it
Put it up on github so we can all check it out.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I was recently put in charge of the wiki for the development team. The wiki is still in its infancy, so I have a lot of room to work with. It goal is to house internal to the development team. Currently, the main piece of information that the wiki holds is Coding Standards.
What are some best practices your dev team uses for its internal wiki?
What information is important to have on a dev wiki?
If you were to go to the wiki for your dev team what information would you expect to see?
Is there some information that shouldn't go on the wiki even though it seems like a good idea?
-- edit --
Also, is there a good way to organize the information? ( such as by layer ( data, ui), by porject, or other)
Introduction to the source base for new programmers
General documentation (not the API documentation per-se, but more tutorial like things)
Lists of staff / who's doing what and how to reach them
Notes / resources / articles that explain concepts used in the software
Documentation of the build process and the filesystem layout of the codebase
Other things I usually put up there are
Planning / todo lists
Information that is interesting for others to read
Everything else that I feel should be shared
We had a development wiki and it was a great tool. We used it for everything!
When brainstorming new ideas, we'd capture them on the wiki. The low friction nature of the wiki made it easy for anyone in the organization (we were a small startup) to add ideas as they thought of them. We had a high level "brainstorming" page which linked to detailed pages containing a thorough description of each idea.
For each iteration, we'd "move" feature idea items from the "brainstorming" list to the feature list for that iteration. The details of the feature were flushed out to include design and implementation details.
As features were completed, the iteration page became our release notes page - which also included the release tag from our version control system.
We had a bug page that worked very similar to the feature pages. Bug fixes were added to the iteration/release pages as they were worked on/complete.
We also created our user documentation on the wiki and exported those pages it with the release.
As time went on. This tool was viewed more and more valuable. We wound up creating new wikis for different the products the company was working on.
I hope you find your development wiki as useful as we did!
Wikipatterns is a website dedicated to documenting best wiki practices. They also describe anti-patterns and talk about ways to deal with them. I read their book and it was a great asset for me to get a wiki off the ground in a 150+ person organization.
One thing that we stress on our dev wiki is that it is updated when things change.
We don't want our wiki that is intended to provide information and be a central source of collected knowledge to become so out of date that it is useless. As the code is updated, developers are requested to update any related information on the wiki.
Other than Coding Standards, we keep tips and tricks for working with our code base, setup information for new hires, and general environment information.
The hardest part is getting developers to use your wiki. I have some long standing suggestions here: http://possibility.com/wiki/index.php?title=GettingYourWikiAdopted
Getting a Wiki Adopted is Tough
Have a Champion
Remove Objections
Create Content
Enmesh the Wiki In Company Processes
Evangelize
Don't Give Up
Consider Not Using Wiki For Conversations
Just Do It! Don't Wait For a Budget
Have a Transition Plan
Promoting Your Wiki
One good practice is to have the entire documentation and source code for each build available through your wiki. Then developers will go to wiki to access build info and that makes it invaluable.
Wikis can be a valuable resource for software development teams but they are not a silver bullet. It is all too easy to create a Wiki that would rapidly fall into disuse or become grossly outdated.
In my opinion, the key to a successful Wiki is getting the entire team on board. That means getting people away from other resources (and in particular email archives) as knowledge repositories, and offering some incentive for people to contribute.
However, it's also important to not be a format czar: If you have a lot of documents that you generate in, say, MS WORD, it may be ideal to do them all in Wiki format but that takes time and may be annoying if you have diagrams, documents, etc. In those cases, it's better to compromise and let people keep it in word format, as long as the only way to access the newest version is through the Wiki.
If you're not a manager, you need to get a manager on board because it would require some "enforcement".
There has been accumulating research and experience on Wikis and their use in software engineering. You can search the ACM digital library, for example. I am a coorganizer of an annual workshop on wikis for SE and we had several interesting experience reports and there are additional materials in the international symposium on Wikis.
Burndown charts
common setup information for development environments (nice for when new people start)
Specs
Known issues and workarounds with development tools
Come up with some kind of style guide, and teach others how to style stuff. When I was in charge of a corporate wiki, all of the other developers would just write crummy prose that was barely formatted, and looked terrible.
Keep away from things that require discussion. I tried shoehorn in a book review section, but it was too difficult to have others comment on things.
Examples of in house libraries are good. And/or "storyboards" walking a user through a process when MethodX is called.
What are some best practices your dev team uses for its internal wiki?
Make it look nice. I know it doesn't sound important, but if you spend a little time branding it pays off in terms of people actually using it. And uptake is key, or it will just wither and die.
What information is important to have on a dev wiki?
General information about a Project, milestones, delivery dates etc.
Summaries of design decisions/meetings. Important so that you don't re-visit the same areas time and time again.
HowTo guides for general development of current projects (for example, how to develop a new Plugin)
If you were to go to the wiki for your dev team what information would you expect to see?
Project information, who is working on what etc. Design decisions. Also best practices and links to useful sites.
Is there some information that shouldn't go on the wiki even though it seems like a good idea?
Low-level task lists tend to fluctuate and not be kept up-to-date, and can be misleading.
Also, critical communications between departments are better suited to e-mail, THEN the conversation can be copied to the wiki. It's too easy to ignore it otherwise!
Remember that a wiki is interactive. If you're thinking about publishing, as in publishing burndown charts, then you're not thinking far enough. Distributing that information is only part of it.
For instance, rather than having a "Current Burndown Chart" page, create a page for "Burndown Chart for Week of 10-27-2008" and then encourage people to comment on the chart, and what it means, and why you did so poorly that week.
We house and inhouse team wiki. And there we put all the necessary information for each project we are developing:
repositories
addresses for virtual machines
passwords
project documentations
project overview
project status
and anything else we fill needs to be written on a project. And it is the most useful web application we are running (besides Mantis) . On more general pages we put a definition of every taxonomy we are using, general project guidelines, polices, coding and developing practices we use.
It is there, it is simple and effective and I think every team should have one of those.