Friday, December 31, 2010

Delete Pointer Passed to Function C++ Parameter

I hate C++ pointers. I switch from C to C++ to Java a lot, so I tend to need refreshing once in a while when I go from Java to C++.
I was updating some old code the other day and came across a function which was supposed to delete a pointer passed to it and then set it to null. When the function returned, the pointer was deleted, but was not null. Reason why: the function had been set up wrong:

void deletePointer(XYZ* _xyz)
{
delete _xyz;
_xyz = 0;
}


void callDeletePointer()
{
XYZ* xyz = new XYZ();
...
...
...
deletePointer(xyz);
}

The way deletePointer really needed to be set up is like this:

void deletePointer(XYZ*& _xyz)
{
delete _xyz;
_xyz = 0;
}

Here's why:
The first deletePointer receives a copy of the pointer to _xyz, which allows the user to modify the object addressed by the pointer.
The second deletePointer receives the actual pointer to _xyz, which allows the user to modify the pointer itself.

Oh and one more tip:
When deallocating memory do this:

XYZ* xyz = new XYZ();
delete xyz;
xyz = 0;

instead of:

XYZ* xyz = new XYZ();
if(xyz != 0)
{
delete xyz;
xyz = 0;
}


Apparently, C++ guarantees operator delete() won't be called by a delete if the pointer is 0, so testing for null is not necessary. In fact, if you do include a pointer null test, the test will be done twice.

Source: C++ Primer, Third Edition, by Stanley B. Lippman, Josee Lajoie


More C++


Friday, December 3, 2010

Verizon Wireless Rolls Out 4G

So on Sunday Verizon Wireless is rolling out its 4G network to 38 select cities. You can go to: www.verizonwireless.com/4Glte, to see if your area will be covered. There seems to be a problem with the link at the moment though.
Initially 4G will only be available for laptops. Verizon's line of 4G smartphones will be revealed next month.
I'm totally looking forward to this. 4G is supposed to be 10x faster than 3G.
3G on my Samsung Alias 2 is pretty good. It's faster than my dial up. I live in a rural area, so dial up and satellite are my only options. At least I thought they were my only options until I saw an ad for AT&T's usb modem. I can use that modem to hop on AT&T's cell phone network with my laptop. Verizon Wireless has a similar modem. I would probably stick with Verizon. The plan I would choose runs about $60 per month. My dial up plan at toast.net is about $10 per month. I haven't been ready to spend that extra $50 a month, but with the 4G network I think I may be ready. The 4G plan is also cheaper than the 3G. The 4G plan is $50 a month for 5 gig of bandwith or $80 for 10 gig. Toast.net is not bad, but downloading and uploading anything larger than a few meg is painful. With 4G, you can download a 2 hour movie in 5 minutes. Watching videos and listening to music online with dial up is extremely painful. My favorite channel, SoapNet, will be no longer in 2012, so I may end up having to watch my soaps online.
When my cell phone contract is up a year from now, I think I'm also going to go for a smartphone, maybe a Droid. We'll see what's available at that point.

Wednesday, November 17, 2010

Consumer Reports Top Pocket Camcorders

I've been browsing the camcorders on Amazon.com. Wow have they come a long way. About 5 years ago I picked up a Samsung SCD103 for about $300. Works great for everyday shooting of the kids. The LCD screen died on it though. It's still usable. I just have to look through the tiny little viewfinder now, which is annoying.
I was reading the December 2010 issue of Consumer Reports and noticed ratings for pocket camcorders. They look really promising for what I would use it for. Simple, affordable, portable, and pretty good quality.
I'm really liking the Kodak PlaySport Zx3. It is available at Amazon.com for $140 as a bundle with a 4gb sd card, tripod and remote control. Sweet little deal. It's the top rated pocket camcorder by Consumer Reports too.
The other 4 top rated pocket camcorders are:

1. Sony Bloggie MHS-CM5
2. Panasonic HM-TA1
3. Sony Bloggie MHS-PM5
4. Creative VF0624

All are available for under $200.


More Camcorders

Friday, October 29, 2010

That!AdvertisingAgency

Advertising is a pretty important part of letting people know about your business, website, blog etc. There is a lot to learn when it comes to advertising. It's even more difficult now that there are so many different arenas that people get their news from. It is no longer just print advertising, such as the local newspaper. Now you have television, the internet, mobile phones, etc.
There is an Advertising Agency called That!AdvertisingAgency. As soon as you go to their website, you can tell they are not your typical Advertising Agency. They are a group of advertising specialists who are up to date on all the current advertising trends. Their mission is to ensure that the client is happy.
They specialize in internet marketing. They use search engine optimization and pay per click management to help bring visitors to your site.
Their PR Agency can help you develop a public relations campaign which reflects the current and future goals of your company.
That!AdvertisingAgency will work with your advertising budget, no matter how big or small, to bring you results. CallTrax technology is used to keep track of which advertising campaigns are working and which are not.
That!AdvertisingAgency can help you develop a marketing return on investment plan. They will give you real time data, so you can measure how effective a campaign is.
If you are looking for help to drive traffic to your website, enlisting the help of an Advertising Agency, such as.That!AdvertisingAgency, would be a great place to start.

Friday, October 1, 2010

Refrigerator Consumer Ratings

About 2 weeks ago my beloved 7.5 year old, $1500 side by side Frigidaire refrigerator started making a buzzing noise when it turned on and food wasn't being kept cold. We cleaned out all the dust behind the fridge, which we'd never done, pretty disgusting, and the refrigerator seemed back to normal. No buzzing, cold food. Unfortunately, a week later the same thing happened. This time we turned the temperature setting to the coldest setting. Noise stopped and food was cold again. Despite this, I called a local appliance repairman. He said it sounded like the compressor. When the compressor goes bad, you need a new fridge. They are too expensive and just not worth it to fix. Wonderful, not what I wanted to hear, since I paid so much money for my fridge. I thought I had bought a good one.
Well, the repairman sent a guy out to take a look at the refrigerator. Definitely the compressor. The repairman said the average life of a refrigerator these days is 7 years. All brands last about the same length. It doesn't matter how much you pay either.
I got out the August 2010 issue of Consumer Reports and took a look at the refrigerator reviews. I really like the side by side refrigerators because they have more freezer space. Prices start around $800 and up. They are the most repair prone though. The French door/bottom refrigerators are priced even higher. With the freezer on the bottom, it might be a little hard to organize, although I'm sure I could manage. The top freezers are much cheaper, but also lack a lot of freezer space. None of the side by side or French door/bottom refrigerators jumped out at me as being "the one". I'm not willing to pay a lot of money, if I'm only going to get about 7 years out of it. I guess refrigerators are not a good investment.
I decided to go with a cheap top freezer refrigerator and buy a chest freezer to make up for the lack of freezer space. I've been wanting to buy one anyways.
I ended up buying the Maytag M1TXEMMWB, the black version of M1TXEMMWW. Maytag was bought out by Whirlpool, which Consumer Reports lists as the refrigerator models with the fewest repairs. Although the repairman said he works on a lot of Whirlpools. All of the reviews for the Maytag M1TXEMMWW were good. It's ranked 4.5 out of 5 stars at Home Depot. Has a lot of features, including an ice maker and adjustable shelving inside and in the door, is very energy efficient, and is cheap. Home Depot has it on sale for $630, free delivery/installation/haul away. After a $10 off promo code of THDSAVE27, 3% off from Ebates, I spent $650 total, which includes tax. New York also has an energy star appliance rebate program, so I may get another $105 off. If this fridge busts in 7 years, I won't feel so bad.

Here are the top 5 refrigerators for each refrigerator type from Consumer Reports:
Top Freezer Refrigerators:
1. GE Profile PTS22LHS[WW] - $1400
2. Kenmore 7930[2] - $960
3. Kenmore 7531[2] - $1250
4. Maytag M1TEXEMMW[S] - $750
5. LG LTC22350[SW] - $850

Bottom Freezer Refrigerators:
1. Whirlpool Gold GX5FHTXV[Q] - $1700
2. LG LFC25770[SW] - $1400
3. Samsung RF266AE[WP] - $1500
4. LG LFX28977[SW] - $2400
5. Samsung RFG298AA[WP] - $2500

Side-By-Side Refrigerators:
1. Whirlpool Gold GS5VHAXW[Q] - $1800
2. Bosch Linea 800 B22CS8OSN[S] - $2700
3. GE GSH22JFX[WW] - $1050
4. Samsung RS275AC[WP] - $1300
5. GE GSH25JFX[WW] - $1000

For the freezer, I'm going with a Kenmore from Sears for a little less than $400, but am waiting a few weeks before I buy that.

Consumer Search refrigerator picks

More Refrigerators

Thursday, September 23, 2010

RunIt

My first programming job was for a company who's main focus was on their POS software, which is used by many companies in the fast food industry.
There is a company called RunIt who produces similar software only for the retail industry. They have been in business since 1995. They are based in New York, NY. In 1995, they released touch screen Windows based retail software. They were the first in the industry to see the potential of using Windows. The system provides data in real time and is web based, which is a cool feature. Being web based lets retailers access their data from anywhere. Retailers can process orders at tradeshows or at any mobile location with a web browser and internet connection. Business stats can also be viewed from anywhere. POS terminals are not required and on site implementation is not required. It will only take days to get up and running using RunIt, rather than weeks. Software updates and backups are no longer required, so no more having to deal with IT issues. All you have to do is use the software.
Data is managed through RunIt's state of the art secure data center. You can import your existing data and get copies of the backed up data.
The service is available for a low monthly subscription, which allows you to "pay as you grow". Unlimited support is included in the monthly subscription
RunIt is great for small companies or large companies, so if you are looking for a real time point of sale system, RunIt may be the answer.

Friday, September 17, 2010

Buying a new laptop

I'm in the market for a new laptop. My current laptop is running Windows Vista. Guess that says it all. Vista is not the greatest operating system. It's slow and different applications are always crashing. I really want to give Windows 7 a try.
My little 2 year old started popping keys off my laptop one day. I popped them all back on except for the shift key, so I have no shift key at the moment and the little green push thing underneath the shift key fell off. At least I can still use the shift key though. Then I got a crumb stuck underneath the J key. I popped the J key off and the tab which holds the key in place broke off, so I have no J key too. My poor laptop is in rough shape.
For my next laptop, I have a bunch of options. I can go with a brand name like Dell, HP, or Gateway. I can head over to Walmart or Best Buy and get whatever they sell. I can also get a custom made laptop from an independent retailer.
Not sure yet which way I am going to go, but I was recently made aware of Howard custom computers. It is a US based, family owned company in Mississippi. In 1968 Billy Howard Sr. quit his job at General Electric to start his own company with his wife Linda, called Howard Industries. They sell custom computers along with other computer products from Panasonic, Fujitsu and Motion.
It looks like they have a good variety of products available. Besides computers they have storage devices such as hard drives, cd and dvd drives, flash memory etc., network devices such as modems, routers, network cards etc. and software such as operating systems, graphic design and games.
Customer service seems to be important too. Customer service is all based in the US to assist with technical training, support and networking.
Howard custom computers might be a good choice if I decide to go with a custom laptop.

Wednesday, September 1, 2010

Use the Internet to Comparison Shop!

The Author of this post is Solomon Dejesus

I wanted to buy my husband Rich a new digital camera for Christmas last year, but I'm not the most tech-savvy person around, and I wasn't sure I could find exactly what he wanted in the stores. So I did some comparison shopping using hughes satellite internet service and was really pleased at how smoothly the process went. I finally decided on a FujiFilm FinePix camera -- it had a much longer battery life than our old camera, which was super-important, and it could store literally a thousand photos, which I knew would come in handy at our family reunion this year. :D

The best part was I found a deal on Amazon where I got not only free shipping on the camera, but they also threw in a free carrying case as well. So not only did I get Rich a camera he loved, but I didn't have to spend tons of money to do it -- I think the whole gift was under a hundred dollars.

I'm so glad we upgraded to hughes wireless Internet last fall -- I don't think there was any way I could have done that sort of research using our old super-slow dial-up, and I probably would have just gotten frustrated and given up on the whole thing.

ImTOO DVD Ripper

Seems like everyone these days has some sort of portable electronics device like an ipod, smart phone or multimedia phone. I just have a Samsung Alias 2 multimedia phone, but when my contract with Verizon Wireless renews I'm most likely going to suck it up and go for a smart phone. I didn't really want to pay an extra $30 a month just yet. The Alias 2 gave me a taste of what I can do internet wise like check email, facebook and twitter. All I have is dial-up for my home internet connection, so a smart phone would be a great backup internet connection.
One cool option I did sign up for is Video on Demand. Now I can catch up on the CBS and NBC soap operas. If only ABC had their soap operas available on Video on Demand. With the smart phone I could probably just watch them on the networks websites.
There is also a tool called DVD Ripper by a company called ImTOO. It takes a dvd and converts it to different audio or video formats, including formats supported by the iPod, iPhone 3G, iPhone 3GS, iPhone 4, Apple TV, PSP, PS3, BlackBerry, iRiver PMP, Windows Mobile phone, Xbox, mobile phone, NDS, and Wii. If you have one of the supported cell phones, you can just rip dvd to the format you need, transfer the output to your phone and watch it wherever you go. That is another plus for upgrading to a smart phone. Technology these days is so amazing!
DVD Ripper will also rip dvd to hd, which is nice.
Another feature is it lets you edit the video and add effects.
There are 3 versions of DVD Ripper available: standard, platinum and ultimate. Prices range from $35.95 for the standard version to $45.95 for the platinum version and $55.95 for the ultimate version. A free trial is also available. A mac version called DVD Ripper Mac is also available.
ImTOO also produces a Video Converter for mac, which converts media files to other formats.
If you have a smart phone, or even an Xbox, Nintendo or Wii, DVD Ripper sounds like it would be a nice little tool to have to convert your dvds to a new format.

Saturday, August 28, 2010

Hyundai Santa Fe

About 6 years ago, I was on my way home from work and a car pulled out in front of me, totaling my car. It was my first brand new car, a white Grand Am, that I had planned on keeping forever. lol. I was very upset.
I ended up buying a brand new black Hyundai Santa Fe. The black signified that I was in mourning for my car. lol. I test drove a bunch of different SUV's, but that was the SUV I liked the best and that reminded me the most of how my car handled. It was a great choice. Not too bad on gas and handles very well. I definitely wouldn't want a bigger SUV though. The Hyundai Santa Fe has plenty of room on the inside and I just wouldn't be able to handle driving a larger vehicle. I'm not the greatest backer upper, so a bigger vehicle would be a little difficult for me to handle, as I'm not the biggest person anyways. Maybe if I had an auto backup camera, I could handle driving a bigger vehicle, and I wouldn't have so many blindspots when backing up. Someday when I retire I would like to invest in an RV, so I would definitely have to get an auto backup camera for that.
I have a mountain bike, so one thing I would like to buy for my Hyundai Santa Fe is a graber outback bike rack. I live in upstate New York and there are lots of biking trails throughout New York, New Hampshire and Vermont. Hopefully one of these days I will be able to take some time off and go check them out.
The unexpected event of totaling my car turned out to be a good thing. I totally love my Hyundai Santa Fe and highly recommend it.

Thursday, February 25, 2010

Wireless Dial Up Internet Connection

I have raved many times about the Wiflyer. The cool, little tool, which turns a dial up internet connection into wireless using wifi. I've used it every day for about 3 years now, and it's been great. Unfortunately, it's been acting flaky the past few months, so I started looking for alternatives.
Always On Wireless, the company who makes the Wiflyer, appears to have disappeared. The Wiflyer is still available on ebay.
There's a tool called Nebo Wireless, which uses 900Mhz FM cordless phone technology. It includes a base unit with a usb communicator. Looks kind of cool.
I could hook up a wireless router to my desktop and tap into the internet connection from my laptop. I decided this would be a last resort, since I don't want to leave my desktop on all the time. Too big of a waste of electricity. My laptop costs much less to leave on than my desktop.
The last option I discovered is a bluetooth modem. There appears to be several different brands, but the only one I could find a link to, to buy was from a company called Zoom Telephonics. The modem plugs into an electrical outlet and a phone jack. That's it. You then can connect to the modem using bluetooth. If your computer does not have the bluetooth capability built in, then you will need a separate bluetooth adapter, also called a bluetooth dongle. There are different classes of bluetooth: 1, 2 and 3. Class 2 seems to be the most common, but Class 1 provides the furthest range, 100m. The bluetooth modem from Zoom is a Class 1. Zoom also has several bluetooth adapters including a Class 1 adapter. A Class 2 bluetooth adapter will work, but your range will be limited to about 10m, so for a wireless dial up internet connection it makes more sense to go for the Class 1 bluetooth adapter to get the longer range.
Well, the bluetooth modem is the option I went with and it is AWESOME!! The Zoom bluetooth modem is very small, about half the size of the Wiflyer. The only thing missing is a volume control for the sound the modem makes when dialing up your connection. The Wiflyer had a volume control. The bluetooth modem comes with an installation cd that you put in your computer and install. Easy and went smoothly.
The bluetooth adapter I went with was the Class 1 Zoom bluetooth adapter. The bluetooth adapter is also great for connecting my cell phone to my laptop for transferring pictures. The bluetooth adapter also came with an installation cd. Installation of that also went smoothly, no problems. The software used is BlueSoleil. Not sure if that's good software, but it's been working well so far.
Once the software is installed, you search for bluetooth devices. Once the modem is found, you right click on the found modem icon and connect bluetooth dial up networking. A dial up networking box comes up where you enter your ISP username, password and dial up phone number. The only problem I've come across so far, is sometimes it takes a couple of tries for the connection to connect. Maybe it's just the ISP and nothing to do with the modem. The Wiflyer sometimes had problems. It's hard to tell.
Connection speed seems pretty good. I still need to find a good way to find out what my connection speed is. If anyone has any tips, please let me know. I also use Google Chrome, which definitely is the fastest browser I've tried. Browsers I've tried include Internet Explorer, Opera, Firefox and the classic version of Maxthon. Maxthon comes in second, with Firefox third.
Both bluetooth items are available at Amazon.com: Zoom bluetooth modem, Zoom bluetooth adapter.
If anyone has any other suggestions for creating a wireless dial up internet connection, please let me know.



Wednesday, January 27, 2010

SVG: Scalable Vector Graphics on the web

The SVG Working Group is trying to increase the exposure of SVG, Scalable Vector Graphics. Definitely a good thing as that is what I am working with at the moment. Lots of uses, possibilities for SVG, but not many using it, so at times it can be difficult to find useful, real world information.
Anyways, the SVG Working Group is now on Twitter: http://twitter.com/svgwg.
They now have a blog: http://www.w3.org/blog/SVG.
They also have Identi.ca accounts: http://identi.ca/svgwg.


More SVG, Scalable Vector Graphics