User Login

Help Community Login:

Writing a new tool for mobsters with Visual Studio .NET

8 replies [Last post]
Uncle Freakin Joe's picture
Uncle Freakin Joe
Premium Member (Silver)I'm a Code Monkey!I use Internet ExplorerWindows User
Joined: 07/04/2009
Posts: 53
Drops: 95

Well, I've thought about it. I've thought about it. Then yesterday I started to do it.

I have a few DLL's started in C# with plans of porting over some other VB .NET code for a GUI. The plan is to do at least the very basic things that Orly's Mob Manager does, except make it Windows based. Why?

There are some pitfalls with what he's really wanting to do with what he has by sticking to a spreadsheet. There is a way to make a dynamic rendering manager, however it's not so readily integrated into anything with MS Office. Face it, there is more to code than VB script and the absence of being able to integrate bonafide .NET assemblies in.

So...I am starting with some simple things. I have some interfaces that are very generic. You basically have 2 things you buy in mobsters. You buy equipment, and you buy real estate. Everything else from that point is more or less presentation. So, the first thing I did was start to get some interfaces together.

I have those in C#. Here is an example of what I am thinking:

using System;
using System.Collections.Generic;
using System.Text;

//Written by Joseph I. Szweda
//July 6, 2009.
//This is a simple reusable interface for business objects
//for real estate within mobsters.

namespace MobsterRealEstate
{
interface IMobsterRealEstate
{

string strRealEstateName
{
get;
set;

}

int intRealEstateQuantity
{
get;
set;

}

int intBaseCost
{
get;
set;

}

int intIncome
{
get;
set;

}

int intCurrentPrice
{
get;
set;
}

decimal decReturnOnInvestment
{
get;
set;
}

int intLevelAvailableAt
{

get;
set;
}
}
}
All that amounts to is a simple interface with things that are applicable to both lots and developed land. So based on that, we can have a signature set that is implemented in 2 other classes.

//Written by Joseph I. Szweda
//July 6, 2009
//This is a class that implements the IMobsterRealEstate
//interface for developed land.

using System;
using System.Collections.Generic;
using System.Text;

namespace MobstersRealEstate
{
class MobstersDevlopedLand : MobsterRealEstate.IMobsterRealEstate
{

//Construct
MobstersDevlopedLand()
{
}

//Destructor
~MobstersDevlopedLand()
{
}

//locals
private string m_strRealEstateName;
private int m_intRealEstateQuantity;
private int m_intBaseCost;
private int m_intIncome;
private int m_intCurrentPrice;
private decimal m_decReturnOnInvestment;
private int m_intLevelAvailableAt;

#region IMobsterRealEstate Members

string MobsterRealEstate.IMobsterRealEstate.strRealEstateName
{
get
{
//throw new Exception("The method or operation is not implemented.");
return this.m_strRealEstateName;
}
set
{
//throw new Exception("The method or operation is not implemented.");
this.m_strRealEstateName = value;
}
}

int MobsterRealEstate.IMobsterRealEstate.intRealEstateQuantity
{
get
{
//throw new Exception("The method or operation is not implemented.");
return this.m_intRealEstateQuantity;
}
set
{
//throw new Exception("The method or operation is not implemented.");
this.m_intRealEstateQuantity = value;
}
}

int MobsterRealEstate.IMobsterRealEstate.intBaseCost
{
get
{
//throw new Exception("The method or operation is not implemented.");
return this.m_intBaseCost;
}
set
{
//throw new Exception("The method or operation is not implemented.");
this.m_intBaseCost = value;
}
}

int MobsterRealEstate.IMobsterRealEstate.intIncome
{
get
{
//throw new Exception("The method or operation is not implemented.");
return this.m_intIncome;
}
set
{
//throw new Exception("The method or operation is not implemented.");
this.m_intIncome = value;
}
}

int MobsterRealEstate.IMobsterRealEstate.intCurrentPrice
{
get
{
//throw new Exception("The method or operation is not implemented.");
return this.m_intCurrentPrice;
}
set
{
//throw new Exception("The method or operation is not implemented.");
this.m_intCurrentPrice = value;
}
}

decimal MobsterRealEstate.IMobsterRealEstate.decReturnOnInvestment
{
get
{
//throw new Exception("The method or operation is not implemented.");
return this.m_decReturnOnInvestment;
}
set
{
//throw new Exception("The method or operation is not implemented.");
this.m_decReturnOnInvestment = value;
}
}

int MobsterRealEstate.IMobsterRealEstate.intLevelAvailableAt
{
get
{
//throw new Exception("The method or operation is not implemented.");
return this.m_intLevelAvailableAt;
}
set
{
//throw new Exception("The method or operation is not implemented.");
this.m_intLevelAvailableAt = value;
}
}

#endregion
}
}

Then for developed land, we can see the reuse of the same interface:

//Written by Joseph I. Szweda
//July 6, 2009
//This is a class that implements the IMobsterRealEstate
//interface for undeveloped land.

using System;
using System.Collections.Generic;
using System.Text;

namespace MobstersRealEstate
{
class MobstersUndevlopedLand:MobsterRealEstate.IMobsterRealEstate
{

//Construct
MobstersUndevlopedLand()
{
}

//Destructor
~MobstersUndevlopedLand()
{
}

//locals
private string m_strRealEstateName;
private int m_intRealEstateQuantity;
private int m_intBaseCost;
private int m_intIncome;
private int m_intCurrentPrice;
private decimal m_decReturnOnInvestment;
private int m_intLevelAvailableAt;

#region IMobsterRealEstate Members

string MobsterRealEstate.IMobsterRealEstate.strRealEstateName
{
get
{
//throw new Exception("The method or operation is not implemented.");
return this.m_strRealEstateName;
}
set
{
//throw new Exception("The method or operation is not implemented.");
this.m_strRealEstateName = value;
}
}

int MobsterRealEstate.IMobsterRealEstate.intRealEstateQuantity
{
get
{
//throw new Exception("The method or operation is not implemented.");
return this.m_intRealEstateQuantity;
}
set
{
//throw new Exception("The method or operation is not implemented.");
this.m_intRealEstateQuantity = value;
}
}

int MobsterRealEstate.IMobsterRealEstate.intBaseCost
{
get
{
//throw new Exception("The method or operation is not implemented.");
return this.m_intBaseCost;
}
set
{
//throw new Exception("The method or operation is not implemented.");
this.m_intBaseCost = value;
}
}

int MobsterRealEstate.IMobsterRealEstate.intIncome
{
get
{
//throw new Exception("The method or operation is not implemented.");
return this.m_intIncome;
}
set
{
//throw new Exception("The method or operation is not implemented.");
this.m_intIncome = value;
}
}

int MobsterRealEstate.IMobsterRealEstate.intCurrentPrice
{
get
{
//throw new Exception("The method or operation is not implemented.");
return this.m_intCurrentPrice;
}
set
{
//throw new Exception("The method or operation is not implemented.");
this.m_intCurrentPrice = value;
}
}

decimal MobsterRealEstate.IMobsterRealEstate.decReturnOnInvestment
{
get
{
//throw new Exception("The method or operation is not implemented.");
return this.m_decReturnOnInvestment;
}
set
{
//throw new Exception("The method or operation is not implemented.");
this.m_decReturnOnInvestment = value;
}
}

int MobsterRealEstate.IMobsterRealEstate.intLevelAvailableAt
{
get
{
//throw new Exception("The method or operation is not implemented.");
return this.m_intLevelAvailableAt;
}
set
{
//throw new Exception("The method or operation is not implemented.");
this.m_intLevelAvailableAt = value;
}
}

#endregion
}
}
That's basically the very basic code and format I am using to start to frame things up. The nice thing about this is a few things that no employer or PM I've met seems to really understand or care too.

1. This is reusable.
2. It's generic. I can implement this into a web site with ease. I can use it for a Windows client, or both.
3. With a little documentation, you can easily reference the assembly, and make your own custom implementation of the same business object with the same interface. You just pass in an instance of the IMobstersRealEstate interface, and it will work so long as your references are right.

I have some other classes to work on, some custom exception handlers that will go along with these, and of course some validators.

I am still trying to rethink the architecture in comparison to the last Windows based project I did. There is no real data layer, but there is an XML layer. So things are a little backwards in comparison to how you do these things.

I have an XML API that I wrote. The issue is that for me to populate and serialize XML, I would have to inherit my class. Well, that starts to look like a data access tier, so maybe I ought to clone this. If I do, there will be one aspect that is a clone that inherits the API, and perhaps another that inherits some validator classes. It's either that or I have some delegates to stick in.

The thing is if I start using delegates, I fear a mish mosh of data access and business objects. All I really want is a 2 fold thing. I want to be able to access certain XML files in a granular format to minimize maintenance as the game has new items so that the user can simply enter what they want, it gets serialized, the end. Think it's a pipe dream? So did a client I once had before. I made it happen, and I can reuse the same technology here.

So here is the way I envision this working. Have something that inherits my XML API for data access, and maybe modify the constructs for the clones to be instantiated with another object instance of like kind from the parent clone in the data tier. Then I can have a bona fide data access tier, and I can have something to accept data from my presentation tier without intermingling the two.

Yes, it's 2 copies of the same thing-maintenance. However, if I implement this right, and reuse the same exact interfaces, it's really 2 different implementations of the same interface. So...that kinda solves itself or at least most of the headaches there. Smile

As for all the calculations and things, that's all going to live in dedicated business tiers. That's all there is to it. It's a lot easier than using macro's and stinky script. Also, I have an idea for a Mogul Version for the extreme real estate moguls that would use SQL Express in addition to what I propose. That would make n-tier a must. That might be a bit overboard, but there is a point to doing that for certain short sale tactics and such. :-)

So...it's back to architecting more interfaces, DLL's, validators, and of course custom collections to be used by the bussiness tier. Smile

Happy mobbing...and stay tuned.

-joe

I Averaged: 0 | 0 votes

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
STaRDoGG's picture
From:
Olympus
STaRDoGG
Head Mucky MuckJoined the Dark SidePremium Member (Gold)I'm a Code Monkey!The Steel CurtainI use FirefoxI use Google ChromeI use Internet ExplorerI use SafariLinux UserMac UserWindows UserI donated to GeekDrop simply because I love it!Booga Booga BoogaI took a bite of the AppleFormer Phrozen Crew MemberI'm MagicMember of VileThe Dr. put the stem on the apple!The JokerSomeone thinks you're udderly delightful!
Relationship Status:
Single & Not Looking
Joined: 01/14/2009
Posts: 2622
Drops: 3109
Mood: Energetic
Re: Writing a new tool for mobsters with Visual Studio .NET

One idea, as much time as you've spent on that XML class, you could forgo it and use a SQL db, and create a subscriber based website that people pay X amount per month to login and do all of this. You're choosing XML for portability on people's individual computers, right? And then create a standalone windows gui.

If you'd be wanting to try and make a buck off all the time invested in writing the tool, then you'd have to create it as shareware, and also spend time on a protection scheme (which of course means ya have to Fort Knox it against crackers), or make it a website where you get ongoing payments, and alot less work protecting it. Just an idea.

One thing I've learned to hate about writing my software based on other people's services, is I'm at the will of whatever changes they decide to make without notice, which breaks my software. I got about 3/4 of the way through a slick tool that worked with Mobsteradd.com, and literally, overnight they changed it around so much without notice, it rendered the entire app useless, with no way of saving it.


Sometimes you'll see a strange spot in the sky ...
Uncle Freakin Joe's picture
Uncle Freakin Joe
Premium Member (Silver)I'm a Code Monkey!I use Internet ExplorerWindows User
Joined: 07/04/2009
Posts: 53
Drops: 95
Re: Writing a new tool for mobsters with Visual Studio .NET
STaRDoGG wrote:

One idea, as much time as you've spent on that XML class, you could forgo it and use a SQL db, and create a subscriber based website that people pay X amount per month to login and do all of this. You're choosing XML for portability on people's individual computers, right? And then create a standalone windows gui.

If you'd be wanting to try and make a buck off all the time invested in writing the tool, then you'd have to create it as shareware, and also spend time on a protection scheme (which of course means ya have to Fort Knox it against crackers), or make it a website where you get ongoing payments, and alot less work protecting it. Just an idea.

One thing I've learned to hate about writing my software based on other people's services, is I'm at the will of whatever changes they decide to make without notice, which breaks my software. I got about 3/4 of the way through a slick tool that worked with Mobsteradd.com, and literally, overnight they changed it around so much without notice, it rendered the entire app useless, with no way of saving it.


Sometimes you'll see a strange spot in the sky ...

As dumb as this may sound, I am not doing this for money. Hell, I can't even give away what I know in all honesty. I am doing this as part of self preservation.

The XML thing isn't for portability. The reason I am doing this is because:

1. I have the API ready to go, and if the game changes, a user can update the changes with ease without breaking it.

2. Start giving a user SQL Express in a package, forget it.

I thought about the web based thing, but the issue at hand is, I have no means of Hosting it. So...I figured just put a simple Windows application out. If the game changes, say...there is a new promotional item. A user can put that information in, it goes to an XML file, and everything else happens.

I did the same thing for a small place based out of Tampa that had a device in which they had to re-code all of their AT commands for 3 different protocols, and add new tabs every time they did a firmware change. It was a maintenance nightmare.

With what I did, a user could open the thing with notepad, or the engineers and type in the new AT command, ship it...poof. Everything else is rendered dynamically. If a user wanted to create a custom tabbed page, they could do that too. No coding required.

That's where Orly's got a problem with his spreadsheet (which is awesome). He has it write protected, so you can't readily add new things on. The game changes, here's an update. With what I propose, if the game changes, enter in whatever came out in a very user friendly format, the end.

There is only one reason I would use SQL for something like this. Assume I wanted to track when I bought a particular property so I know how to manipulate the profitibility and short sell technique I learned. It would be nice if there was a date and time as to what you bought, when, how much, and what you've made from it. It would also give a lot more accurate idea as to net worth.

Honestly, making money writing software hasn't worked for me. Nobody wants to do it right. They chastise me for putting a passion into what I do, and it's more about keeping up appearances with some manager so they look good to some clueless client or some other executive if not both. It interferes with business, and how things are engineered, and I get the brunt of it.

I value what's left of my sanity more than that for one. Secondly, there is a right way and a wrong way to make a dollar. Sometimes appeasing someone for a paycheck isn't really in their best interests, and when you try to be honest about that, you get fired for doing the right thing.

I'm just doing this to keep myself going. Like I said; I exist. I do some other "technical writing" elsewhere, and I'm running out of samples to study, test, and write about. So...it's something to do, and maybe somehow, somewhere, someday...someone might say come back to Orlando or come to Miami, do it right, the end.

Bah....you can tell I've had too much medication. Worried

-joe

Uncle Freakin Joe's picture
Uncle Freakin Joe
Premium Member (Silver)I'm a Code Monkey!I use Internet ExplorerWindows User
Joined: 07/04/2009
Posts: 53
Drops: 95
Re: Writing a new tool for mobsters with Visual Studio .NET

PS. I can't read your comment on my other post. For some reason it says page not found for the entire thread. ((shrugs))

-joe

STaRDoGG's picture
From:
Olympus
STaRDoGG
Head Mucky MuckJoined the Dark SidePremium Member (Gold)I'm a Code Monkey!The Steel CurtainI use FirefoxI use Google ChromeI use Internet ExplorerI use SafariLinux UserMac UserWindows UserI donated to GeekDrop simply because I love it!Booga Booga BoogaI took a bite of the AppleFormer Phrozen Crew MemberI'm MagicMember of VileThe Dr. put the stem on the apple!The JokerSomeone thinks you're udderly delightful!
Relationship Status:
Single & Not Looking
Joined: 01/14/2009
Posts: 2622
Drops: 3109
Mood: Energetic
Re: Writing a new tool for mobsters with Visual Studio .NET

Hosting for something like that can come pretty cheap these days, if you did decide to try using an SQL backbone. Dreamhost has pretty cheap packages, as well as a few other places. The subscriptions could pay for the Hosting tenfold if it did well. At least sounds like it could be a fun project.

Ever try doing some freelance coding on one of those Rentacoder type sites? Not as profitable as a regular salary of course since you're bidding against Indians who do things for $10, but if you're fast enough, it can add up. Especially with reusable classes.

Try this link to the other page.


Sometimes you'll see a strange spot in the sky ...
Uncle Freakin Joe's picture
Uncle Freakin Joe
Premium Member (Silver)I'm a Code Monkey!I use Internet ExplorerWindows User
Joined: 07/04/2009
Posts: 53
Drops: 95
Re: Writing a new tool for mobsters with Visual Studio .NET
STaRDoGG wrote:

Hosting for something like that can come pretty cheap these days, if you did decide to try using an SQL backbone. Dreamhost has pretty cheap packages, as well as a few other places. The subscriptions could pay for the Hosting tenfold if it did well. At least sounds like it could be a fun project.

Ever try doing some freelance coding on one of those Rentacoder type sites? Not as profitable as a regular salary of course since you're bidding against Indians who do things for $10, but if you're fast enough, it can add up. Especially with reusable classes.

Try this link to the other page.


Sometimes you'll see a strange spot in the sky ...

I have that API documented in MS Word if you want to review that-not a problem.

I've worked with a few of these Indians at a place that does outsourcing-the same place that fabricated a sex harassment allegation to get rid of me a week after I told them and their client (without knowing I was talking to the client) that what they proposed solved nothing and wasn't HIPAA compliant as promised. Not to be derogatory or anything of the like, however I think that they're submissive to the point where apathy gets in the way of doing things. I've seen some really brilliant people from that part of the world, and I've seen some that know better, but they're too submissive to say flat out, this is stupid and a waste of money.

I tried doing the freelance thing. Here is what I've learned. As soon as I say budget, I hear money isn't a problem. That translates too they have no money. I've gotten screwed too many times on people doing the freelance thing. Here? I took an ad in the local paper and realized how few people actually had a computer, and they thought my rate was too expensive to come out for a little over half of what CompUSA and places of the like charge for the same thing. So there went that. When I was in Orlando, I did better with a parking lot flyer doing repair stuff while my flyer was visible. After a new phone, business cards and all that to start, I turned enough profit to eat at Chick-Fil-A. Then the flyer went, and there went the business.

As for Hosting, there is one small problem. I literally have 0 income. I don't qualify for unemployment in this state, nor do I qualify for assistance of any kind unless I had a few illegit kids. If it requires dime one, I can't do it. That's the reality.

When I thought I had some viable stock options before everything crashed, I thought I had something like 80K that I could have put into my own thing. I was going to upgrade my own connection, build my own rack, and I was going to start trying to float some quotes. That all went sour on me, and when it finally came to fruition, I spent a lot of that money on interviews in Orlando and Miami.

I thought about relocating to California. However, nobody pays for relocation, and I can't physically move what I have myself. I'd have to pay someone to move my stuff. Then the pay sounds good. However, when I told someone when you factor in the cost of living in LA on one particular job, I told the guy they need to come up another 20K as otherwise I am working for less money. They said they couldn't do it. Well, I am not going to get googly eyed over something that sounds good when I know it gets eaten up and then some through the cost of living, and end up working for less.

Call me nuts, but if I were to go to California, I have another skill that nobody around here for the most part appreciates. Put me in Beverly Hills, West Palm, Boca, or Bal Harbor, I got another idea that's got nothing to do with computers. I'll leave it at that.

The job market in Orlando where I used to live, it's done for as far as computers. There are many a fly by nighter with a business model that stinks. I could tell that from the emails I get and talking to the people running it. I've seen enough failures, and I am not about to relocate to something I know will fail. As for Miami, you have a few cruise lines, and it's all contract and not permanent. You have Assurant that wants someone to do 3 major things at once-which doesn't work and is part of what literally drove me nuts at a place here in Charlotte. Other than that, what's in south FL? I see some fly by nighter startups and some places dependent on stinky real estate and time shares that have gone under.

I've barked up and down a lot of trees-and I mean a lot for many years. The tree's I've seen are half rotted out inside at best. Plain Face

-joe

Smartmom's picture
From:
Wellington Florida
Smartmom
Banned Member (Way To Go!)
Relationship Status:
Married
Joined: 01/15/2009
Posts: 6389
Drops: -24
Mood: Giggly
Re: Writing a new tool for mobsters with Visual Studio .NET
Uncle Freakin Joe wrote:

Call me nuts, but if I were to go to California, I have another skill that nobody around here for the most part appreciates. Put me in Beverly Hills, West Palm, Boca, or Bal Harbor, I got another idea that's got nothing to do with computers. I'll leave it at that.

OK I'll bite since I'm in Palm Beach what are your other skills or dare I ask

STaRDoGG's picture
From:
Olympus
STaRDoGG
Head Mucky MuckJoined the Dark SidePremium Member (Gold)I'm a Code Monkey!The Steel CurtainI use FirefoxI use Google ChromeI use Internet ExplorerI use SafariLinux UserMac UserWindows UserI donated to GeekDrop simply because I love it!Booga Booga BoogaI took a bite of the AppleFormer Phrozen Crew MemberI'm MagicMember of VileThe Dr. put the stem on the apple!The JokerSomeone thinks you're udderly delightful!
Relationship Status:
Single & Not Looking
Joined: 01/14/2009
Posts: 2622
Drops: 3109
Mood: Energetic
Re: Writing a new tool for mobsters with Visual Studio .NET

I'm always looking to add cool new code to my repository. I'll email ya from my email if you want to send it there.

I'd actually be interested in working something out to host ya if you tried to make a subscriber based site out of it and I got a small cut, but the host I'm on is linux based, and they won't let me install the MONO mod to run asp.net sites. And even then, MONO is a little bit squirrly yet. Maybe down the road when I can free up a little time, I'll rent an IIS server, and we can figure something out, if youre' interested. Smile


Sometimes you'll see a strange spot in the sky ...
Evil Monkey's picture
Evil Monkey
Moderator (Watching Over The Masses)Premium Member (Silver)The Steel CurtainI use FirefoxI use Google ChromeI use Internet ExplorerI use SafariI'm Here To Help, & Have Proven It!Windows UserMember of VileThe JokerSomeone thinks you're a Rotten Tomato!STaRDoGG <3's you ;)
Joined: 01/22/2009
Posts: 234
Drops: 350
Re: Writing a new tool for mobsters with Visual Studio .NET

For a small investment you could just put together your own server and stop paying other people to host your stuff.

Just a thought. but I suppose bandwith could become an issue if your talking subscriber based.
--
I hope that after I die, people will say of me: "That guy sure owed me a lot of money.''

Who's New

metaclippingpath's picture
Generalocee's picture
emma agro's picture
DarkkDdream's picture
Larisabrownb's picture
conor13's picture
MeadeDorianx's picture
Emilylowes's picture
Emmaythomson's picture
Chair's picture
Financial's picture
Red bud's picture
DonnaStella123's picture
WenrichFeugene's picture
Weissert's picture
facebook codes exploits tips tricks Phrozen Crew
All contents ©Copyright GeekDrop™ 2009-2024
TOS | Privacy Policy