Warning

 

Close
Confirm Action

Are you sure you wish to do this?

Cancel Confirm
AR15.COM
Previous Page
/ 2
Next Page
2/27/2009 7:04:50 PM EDT
** Non Technical People **



I'm interested in writing a program that others can use to keep track of their inventory. You know, things like guns, ammo, accessories, etc, etc. You could store lots of information about your stuff - serial numbers, pictures, round counts, logs of range time + round count, etc...whatever (suggestions welcome - get creative). Another member has already written something like this, but I'm told it's a bit buggy and he's not actively working on it any longer. He also won't give up the source code (I think it's written in Visual Basic, but I don't remember), so it's impossible for other talented members to fix and or improve upon it.  I'd like to write something of my own and share it, with your input and suggestions for "neato" features you'd like to see in your "dream" application. It would run on both Linux and Windows (and OSX, possibly).



Give me your thoughts on this. Is this something you'd like to see? Use your imagination - the sky is the limit. What kind of features would you love to see? Talk about them. Brainstorm. Your imagination is the only limit.





** Technical People **



I'm doing this as an excuse to brush up on a few things, namely C application programming, and the GTK libraries. In addition, I'd like to finally start getting serious about using source control and versioning, specifically using git (I'm not interested in cvs or svn...at all). The GTK libraries are certainly portable, and GTK apps can be made to run on either Linux systems or Windows (I'm not interested in using QT, so don't ask). This is primarily for Linux systems (and my own amusement), but I expect that it'll run on Windows systems as well. I know there are other libraries that are more portable, and I know there are other languages that are more suited to application development, but again - this is really more for my benefit. I want to do it in C, and I want to use GTK.



The biggest thing I'd like to do, is GPL the source. In fact, I consider this critical. I enjoy doing projects like this in my free time, but what I don't enjoy is being the only guy who can maintain it or add features (see: free time). I also want (demand, really) that any code I write be completely visible to any users, as I'm vehemently opposed to the idea of telling someone "hey, install this" without at least giving them the option to examine the source and compile it themselves, if they wanted. And again, users of software should be free to modify it as they see fit. It's theirs, afterall. So it'll be GPL'd.



By making the source available (and managed with git - this is crucial), other developers on arfcom can join in on the fun (this is my favorite part of the whole idea). And since git is truly distributed, there's no political mess with giving people cvs commit access or anything like that. I (or you) am free to merge code from anyone I trust and/or like.



What I need some help on, is choosing a database backend (or format) that makes the most sense, and is the most portable. Obviously, there's no reason to use a full blown dbms (or is there?), and at the other extreme, using someting like Berkely DB might not be the best course of action either. I've even considered just storing everything as metadata (using XML, for example), but I'm just not sure. I could use some guidance, here.



Brainstorm with me. Give me some ideas. This will be my first attempt at writing a full blown gui application in C, using GTK on Linux, intended for mass consumption. It will also be my first time doing this collaboratively with other developers. Talk to me. Talk out loud. Start talking and throwing your thoughts out there.





** All Users **



This could end up being pretty cool, and it could end up being the first truly collaborative effort between arfcommers to create great software, that we all might use to make our firearms hobby that much more rewarding. Discuss it, and maybe something really fantastic will emerge.
2/27/2009 7:07:28 PM EDT
[#1]
I made my own excel program which is really basic just to log what they are, serial #'s, caliber, condition, valuation...that kind of stuff.

Stupidly simple spreadsheet––you are way more advanced than I am but mine serves our purposes very well.

HH
2/27/2009 7:09:37 PM EDT
[#2]
This is a great idea.


TAG.
2/27/2009 7:11:34 PM EDT
[#3]
Do it on the web.





Locking data up in a simple vertical application is silly.



ETA.  Look at SQLite for your "backend."

2/27/2009 7:15:11 PM EDT
[#4]
You mean something like Gunsafe?
2/27/2009 7:16:18 PM EDT
[#5]
Maybe I am low-tech, but some well structured tables in Access enables some nice reports and queries that are informative.

2/27/2009 7:20:07 PM EDT
[#6]
Well, first off you should dump C and use something like Delphi.

I'm not sure what your database options are for the route you're planning on taking. I own Kylix but I've never actually done any Linux development. For similar Windows-based apps I use an embedded database. I think that's the route you should take. Please don't go the XML route. All you'd be writing is a glorified parser.

A quick google search turned up this: http://www.sqlite.org/
ETA: Damn, beat me on this one.

Maybe Firebird but I don't recall if it's embedded or not. I don't think so.

The key is to make it as painless as possible for the end user. You don't want to have people trying to install MySQL or some other db solution. I think embedded is the only way to go.

Gunsafe: It does NOT run Mac or Linux.
Access:
2/27/2009 7:35:34 PM EDT
[#7]
Quoted:
Well, first off you should dump C and use something like Delphi.

I'm not sure what your database options are for the route you're planning on taking. I own Kylix but I've never actually done any Linux development. For similar Windows-based apps I use an embedded database. I think that's the route you should take. Please don't go the XML route. All you'd be writing is a glorified parser.

A quick google search turned up this: http://www.sqlite.org/
ETA: Damn, beat me on this one.

Maybe Firebird but I don't recall if it's embedded or not. I don't think so.

The key is to make it as painless as possible for the end user. You don't want to have people trying to install MySQL or some other db solution. I think embedded is the only way to go.

Gunsafe: It does NOT run Mac or Linux.
Access:


So 5% of the people cannot use it.

2/27/2009 7:42:23 PM EDT
[#8]
make sure the data stored is encrypted.  if you need any help with this project let me know
2/27/2009 11:13:06 PM EDT
[#9]



Quoted:


make sure the data stored is encrypted.  if you need any help with this project let me know


What backend db method, and what form of encryption?



 
2/27/2009 11:15:33 PM EDT
[#10]
id like to see it provide me with free alcohol.  that would be nice.
2/27/2009 11:17:50 PM EDT
[#11]
My collection is not that diverse yet.
2/27/2009 11:18:25 PM EDT
[#12]
Quoted:
id like to see it provide me with free alcohol.  that would be nice.


this, and bitches.
2/27/2009 11:33:15 PM EDT
[#13]
I use gun safe, for now  it works but leaves a little to be desired.The key to Gun Safe is that its FREE
2/28/2009 12:06:30 AM EDT
[#14]
subnet,
over in the missouri hometown forum a user made up something similar to what you are wanting i believe.  might hop over there and ask about it.  i believe the user was jjandmel.  my coding sucks or i would offer to help.  one of these days i will get off my ass and start relearning c++ and work up from there.
thanks
sean aka boppie
2/28/2009 12:11:39 AM EDT
[#15]
Why goto all that trouble when someone could just use a spreadsheet from MS Office or something?
2/28/2009 5:03:17 AM EDT
[#16]
On another note. It's hard to have a tragic boating accident if you have a log.
2/28/2009 5:22:04 AM EDT
[#17]
I would be very interested in using this.  I have a real crappy way of keeping track of all my stuff right now.  I have a notepad and a pencil.  It gets a little hard to keep track of maintenance issues, round counts, etc.    I like to log my maintenance info.  Being able to put pictures in would also be very helpful. T
2/28/2009 5:31:41 AM EDT
[#18]
while I admire sub's desire to take on this task and to practice his mAd haxor skilz, I'm satisfied with my spreadsheet.
sorry bro!
2/28/2009 5:36:38 AM EDT
[#19]
Quoted:
So 5% of the people cannot use it.

Did you bother reading the OP? He specifically stated:


It would run on both Linux and Windows (and OSX, possibly).


2/28/2009 5:38:43 AM EDT
[#20]
Please consider making it possible to export to something simple and standard, like csv, so that the data isn't just locked away in the application for eternity.
2/28/2009 5:47:30 AM EDT
[#21]
I just use Open Office, but would be curious to try what you produce.

Key things I like are-

1. Round count of each gun, allowing for a "running" total after any modifications.  As an example, I had a trigger job done on a gun at XXX rounds, and like to know I've shot YYY rounds since the trigger job, with no FTF's or doubling.

2. Ammo stock with brandname and lot #'s,  sorted by caliber and whether self defense or target ammo. Also, I have location horizontally sorted. Main safe, ammobox #4 in closet, etc...

3. Magazine count with location.

4. Each range trips date, and # of rounds through each gun.
2/28/2009 6:19:03 AM EDT
[#22]
If you don't want to use a full dbms, what about either .mdb or perhaps grab the db format and encryption from KeePass (open source)?

I would say take a look at the KeePass source code (under Other Downloads and Resources) and see what you can use from there. It's got good encryption / security and is open source. The KeePass db is set up to hold password information, but that could easily be modified to store pretty much whatever you want.

Hope that helps.
2/28/2009 8:40:07 AM EDT
[#23]
Quoted:
What backend db method, and what form of encryption?
 


AES.   It could be optional for the paranoid or allow a export to plain text option.
As for data format, I dont think you'll need anything like a database as the data set will be pretty small.  Also XML seems a bit overkill but would work fine if you just want to learn it.
In my experience XML is not very useful, but popular among the manager types.  You could use either a simple binary or text(cvs) format.
2/28/2009 8:49:26 AM EDT
[#24]
would Hamas have a secret back door into it?
2/28/2009 8:57:35 AM EDT
[#25]
Build in a robust search fucntion and sell the code to the BATFE, use the proceeds to fun some ARFCOM development and when you get a chance, backdoor into their new 'registration db' and tweak the algorithm so that every time they search for an item, clicking "search" deletes the item from the inventory

Yeah...its criminal fraud.....but its funny

Serious answer....I just use Excel, which for my meager collection is more than strong enough to track what I own and what I trade / sell.
If I ever hit the lottery and could buy more stuff than I wanted to manually count, i'd tie the web based front end to a db (like access for ease of use), hook up a wireless barcode scanner and use pre-printed tags. Picture a big gun room (like those crazy pictures from that museum that everyone claims is their basement) - have a small barcode at the base of the rack / mount where each weapon is stored. The scanner could be used for checking inventory, updating records, etc.

In reality, I dont see most gun owners needing a db to maintain records of their weapon inventory.
The average gun owner probably has a few rifles and a few handguns...low tech solution should do the trick.
2/28/2009 9:05:52 AM EDT
[#26]
I have not programed anything in C or C++ since college - oh 17+ years now

I would be interested to see what you come up with but I would respectfully suggest that regardless the format that you decide to save the data you add an option to export the data as a plain text CSV so that if a person were to export it they could quickly open the raw data in any spreadsheet program.

Another nice to have would be a mechanism to allow the software to upload images that would then be tagged and stored in the database.  Obviously this could get very complicated and may be something for the future once you get the basic system running.  Now, you could also add basic encription to make the csv data worthless without the correct key but I sure would want that to be optional as I like my fireams database to be readable by my survivors if I were to ever die and they need to have a list of what I have and what I think they are worth.

If I were to do this, I would start with a basic MS Access or MYSQL database to define the basic structure and then work on the desktop application.  I just have not worked with desktop apps in a long time as I am a simple PHP/MYSQL coder myself
2/28/2009 9:13:29 AM EDT
[#27]
subnet, I would suggest mysql only because it's universal.  It's either already installed in every major distro, or is a no-brainer to install if its not.  Overkill, yes, but readily accessible and already used by most every other software requiring a backend.

P.S.  Are you for hire?
2/28/2009 9:15:21 AM EDT
[#28]



Quoted:



Quoted:

Well, first off you should dump C and use something like Delphi.




I'm not sure what your database options are for the route you're planning on taking. I own Kylix but I've never actually done any Linux development. For similar Windows-based apps I use an embedded database. I think that's the route you should take. Please don't go the XML route. All you'd be writing is a glorified parser.



A quick google search turned up this: http://www.sqlite.org/

ETA: Damn, beat me on this one.



Maybe Firebird but I don't recall if it's embedded or not. I don't think so.



The key is to make it as painless as possible for the end user. You don't want to have people trying to install MySQL or some other db solution. I think embedded is the only way to go.



Gunsafe: It does NOT run Mac or Linux.

Access:




So 5% of the people cannot use it.





Including Subnet, the OP....



 
2/28/2009 9:30:45 AM EDT
[#29]
You are really a masochist if you want to do this in C.

Could you use .NET and Mono on Linux?

You mentioned the app you want to emulate is in VB. There's a reason it's so popular––it makes developing desktop apps fairly trivial. Add in all of the database framework through ADO so you can plug in to a variety of backends, and I think it could theoretically work. I know it would run on Windows, just don't know how the Mono implementation is.
2/28/2009 9:42:16 AM EDT
[#30]
I have a very similar application that I use to track my personal inventory. Mine is a PHP based webapp that I run off of a Solaris server in my home DMZ. I'm willing to share whatever may be of use to you but if you want to make something portable and distributable, my code isn't going to be much help.

Distributable is going to be your most difficult hump. Ideally you want a DBMS to store the data (I use Oracle 11g). There are many many advantages to using a real DBMS. Backups, encryption, change tracking, resiliently, transaction protection, and on and on and on. You will need to sacrifice much of this to create something easily distributable. My choice would likely be SQLite. You'll get some power of the DB but still be very very portable. It's not ideal but it's better than using some sort of flat file.

As another poster already mentioned encryption is something that should be a must. Personally I use TDE and have my app prompt for the wallet password upon login. I only keep the wallet open long enough to complete the transaction. Sure this is a total killer on performance but it's my personal DB and the transaction activity is very low. As a trade off, my data is very safe. I also encrypt all of my RMAN backups.

The key to your application will be the database. Design it well and find something that offers you some features and you should be fine.
2/28/2009 2:41:07 PM EDT
[#31]
The problem with running MySQL on the backend or a PHP frontend is that you increase the level of complexity to the end user.

I know for a face I could do an embedded app very quickly in Delphi. I'm just sayin'.
2/28/2009 2:47:58 PM EDT
[#32]
Can you come up with something that will help me catalog and keep track of all my gun related shit that I have scattered all over the place?

I need something that will help me remember which silverware drawer in the kitchen I have gun cleaning stuff in.

Thanks in advance.
2/28/2009 2:49:39 PM EDT
[#33]



Quoted:


Why goto all that trouble when someone could just use a spreadsheet from MS Office or something?


Because I'm not "someone", and doing it with a spreadsheet means I didn't do it with C and GTK libs. That's why.




The goal isn't really creating something revolutionary that gun owners drool over, as much as it is an excuse to use C for application programming, and GTK libs for the GUI portion of it. Obviously, you can just do this with a spreadsheet, but I already know how to do that, and that isn't very fun or rewarding.



I just need an excuse to write something.



 
2/28/2009 2:50:12 PM EDT
[#34]
Good deal subnet!
2/28/2009 3:18:37 PM EDT
[#35]



Quoted:


The problem with running MySQL on the backend or a PHP frontend is that you increase the level of complexity to the end user.



I know for a face I could do an embedded app very quickly in Delphi. I'm just sayin'.


Yes, but I don't know Delphi, I don't want to know Delphi, I know C, and Delphi isn't C.




Folks have to take off their professional software engineering hats, and put on their "This has no point, other than Subnet's amusement" hats.



 
2/28/2009 3:20:30 PM EDT
[#36]
Mine is on a note pad



Never needed any thing else



ETA: This has no point, other than Subnet's amusement" hats.


Just seen that
2/28/2009 3:20:44 PM EDT
[#37]
Quoted:

Quoted:
The problem with running MySQL on the backend or a PHP frontend is that you increase the level of complexity to the end user.

I know for a face I could do an embedded app very quickly in Delphi. I'm just sayin'.

Yes, but I don't know Delphi, I don't want to know Delphi, I know C, and Delphi isn't C.

Folks have to take off their professional software engineering hats, and put on their "This has no point, other than Subnet's amusement" hats.
 


You will succeed, 'C' is not rocket science...

Look forward to the first release.

2/28/2009 3:22:25 PM EDT
[#38]



Quoted:


Do it on the web.



Locking data up in a simple vertical application is silly.



ETA.  Look at SQLite for your "backend."



I would, except that I already know how to do that.



 
2/28/2009 3:25:05 PM EDT
[#39]



Quoted:


Maybe I am low-tech, but some well structured tables in Access enables some nice reports and queries that are informative.





That's a great idea for someone who just wants to keep track of their stuff. I would do this myself, except that I already know how to do that (sensing a pattern, here?) and I don't enjoy using Windows.



I could do the same thing on Linux with openoffice.org and Base, but I don't want to, because it isn't as fun or challenging.



Note to all persons: I don't actually have a pressing need to keep track of my inventory.




 
2/28/2009 3:29:24 PM EDT
[#40]





Quoted:



subnet, I would suggest mysql only because it's universal.  It's either already installed in every major distro, or is a no-brainer to install if its not.  Overkill, yes, but readily accessible and already used by most every other software requiring a backend.





P.S.  Are you for hire?



Were this strictly a Linux app, I'd have no problem with this. In these cases, the distribution's package manager will handle the not so pleasant task of installing MySQL as a dependency, and it's possible to make something rather complex transparent to the user. Under Windows, it's not as easy or transparent to the user. For these folks, they need to just click "Install" and that's it. It's harder to pull that off, with a full blown dbms like MySQL. At least, I think so.





I'm looking into SQLite, as suggested.



EDIT: I'm not for hire, no. I'm way too busy with my real job (Cisco voice) to code for money, what with deliverables, project milestones, timelines and all that shit that would be properly expected of me.





 
2/28/2009 3:32:29 PM EDT
[#41]
Dude...

You need a part itme job or a mistress.  Pick one.
2/28/2009 3:37:35 PM EDT
[#42]



Quoted:


Dude...



You need a part itme job or a mistress.  Pick one.


Can she contribute code to the project?



 
2/28/2009 3:57:45 PM EDT
[#43]
I like the idea Subnet.

I'd like to add something like, 'Place Purchased', 'Date Purchased', 'Price Paid' and any other category that describes where the gun came from (Country of Origin for C&R?). I have a few in my collection that would leave my survivors scratching their heads in the event of my death. One of my pet peeves is getting a gun from someone who doesn't remember how he acquired it.
2/28/2009 4:04:52 PM EDT
[#44]
Sub, please make the 'C' code public, thanks!
2/28/2009 4:12:41 PM EDT
[#45]



Quoted:


Sub, please make the 'C' code public, thanks!


When I finally start on it, I certainly will. It will be stored in a git (revision control) repository, and available under an Open Source license, specifically GPL v3.



The reason? Because I think users should be able to see exactly what they're running, and I believe that they should be able to modify their software as they see fit. It also makes it easy for guys like you to contribute code to the project, if you felt so inclined.



I really hate closed source software, and I'm very suspicious of people who refuse to make their source code available - especially for something as silly and trivial as an app that keeps track of your gun stuff. What are they afraid of?



 
2/28/2009 4:14:17 PM EDT
[#46]
Quoted:

Quoted:
Sub, please make the 'C' code public, thanks!

When I finally start on it, I certainly will. It will be stored in a git (revision control) repository, and available under an Open Source license, specifically GPL v3.

The reason? Because I think users should be able to see exactly what they're running, and I believe that they should be able to modify their software as they see fit. It also makes it easy for guys like you to contribute code to the project, if you felt so inclined.

I really hate closed source software, and I'm very suspicious of people who refuse to make their source code available - especially for something as silly and trivial as an app that keeps track of your gun stuff. What are they afraid of?
 


No fear, just want to see your 'C' chops, that is all...

2/28/2009 4:21:09 PM EDT
[#47]
Tag because my pen and paper "technique" got old after the first 200 logs.
2/28/2009 4:26:43 PM EDT
[#48]



Quoted:

No fear, just want to see your 'C' chops, that is all...





You will have much to poke fun at!




 
2/28/2009 4:29:38 PM EDT
[#49]
Quoted:

Quoted:
No fear, just want to see your 'C' chops, that is all...


You will have much to poke fun at!
 


You are a good guy here, me 'maybe not' let me know if you get stuck on pointer 'C' stuff...

2/28/2009 4:35:53 PM EDT
[#50]
Another recommendation for SQLite3 as it is in the public domain.
I have used it in a similar application with good results.

eta: Although I cannot make a recommendation, find a good C ORM library.
Previous Page
/ 2
Next Page