Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (513)
Games in Android Showcase (120)
games submitted by our members
Games in WIP (577)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  BtFree v1.0  (Read 1418 times)
0 Members and 1 Guest are viewing this topic.
Offline doc

Junior Newbie





« Posted 2005-08-03 07:54:56 »

Hi,
BtFree v1.0 is now ready to download.
BtFree is an opensource library for creating client-server application over a Bluetooth connection.
Upon the JSR82 it has been created a simple API for creating Bluetooth application, without direct manipulation of Bluetooth API and its problem.
It has been tested with different phones JSR82 compliant and iwth avetanaBluetooth.
The homepage is http://btfree.javastaff.com
There is also an example of a game that use this library, the game of scissors,rock and paper over Bluetooth Smiley
Comments are welcome.

Federico Paparoni
Offline Abuse

JGO Knight


Medals: 13


falling into the abyss of reality


« Reply #1 - Posted 2005-08-03 17:29:27 »

Alot of the links on the website - including the Javadocs - are broken.

There are also pretty blatent bugs in parts of your code.

com.javastaff.btfree.BlueMSG.setMess(String)

Is fundamentally broken.
Also, I see no reason for abbreviating the method name.

com.javastaff.btfree.BlueMSG constructor

Uses String.getBytes(). This uses the default character encoding on the device.
However, if you are transmitting to a device with a different default character encoding, your message will likely become damaged or corrupt.

com.javastaff.btfree.ConnectionManager.createStreams()

Contains a potencial Memory leak (unclosed InputStream) - and I also disgree with your boolean flag for indicating success.
Exceptions exist explicitly for this purpose - and infact, the above bug wouldn't exist if you had used Exceptions in the way they were intended.

com.javastaff.btfree.PublisherServerImpl constructor

Will throw a NullPointerException if an error occurs during the Publisher constructor.
This is uninformative to the programmer, and is again caused by your catching and not rethrowing of low level errors.

This was from a quick skim of the code, doubtless there are other problems in the API - I suggest you spend some more time testing it in a real coding scenario.
Each time you have to refer back to the source code of the API to deduce what is going wrong, think why that is - and how you can fix the design to avoid this step.

Oh, and your naming convention is abit sucky in places =)

Make Elite IV:Dangerous happen! Pledge your backing at KICKSTARTER here! https://dl.dropbox.com/u/54785909/EliteIVsmaller.png
Offline doc

Junior Newbie





« Reply #2 - Posted 2005-08-04 09:29:21 »

Alot of the links on the website - including the Javadocs - are broken.

Wrong, it works



There are also pretty blatent bugs in parts of your code.

com.javastaff.btfree.BlueMSG.setMess(String)

Is fundamentally broken.
Also, I see no reason for abbreviating the method name.

It'snt broken, abbreviating is my personal decision...

com.javastaff.btfree.BlueMSG constructor

Uses String.getBytes(). This uses the default character encoding on the device.
However, if you are transmitting to a device with a different default character encoding, your message will likely become damaged or corrupt.

In fact this is an implementation of the interface MSG, however i could test it only with a few types of phones (there arent so much JSR82 phones).

com.javastaff.btfree.ConnectionManager.createStreams()

Contains a potencial Memory leak (unclosed InputStream) - and I also disgree with your boolean flag for indicating success.
Exceptions exist explicitly for this purpose - and infact, the above bug wouldn't exist if you had used Exceptions in the way they were intended.

com.javastaff.btfree.PublisherServerImpl constructor

Will throw a NullPointerException if an error occurs during the Publisher constructor.
This is uninformative to the programmer, and is again caused by your catching and not rethrowing of low level errors.
......

This is an opensource library, made by only one person, not an enterprise application for IBM. Be quiet Smiley
Testing this short library was good, so i decide to publish it. If you have comments/improvements or everything else join the project Smiley
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Backmask

Junior Duke




586: The average IQ needed to understand a PC


« Reply #3 - Posted 2005-08-04 09:42:30 »

Doc, you might consider taking the advise that Abuse has given you and not just discard them as it was some form of personal critisism. He has given some of his time to go through the source code and from his knowledge and background found a few thing to improve. I am not saying that everything he says may be correct as I don't have looked in to it. But anyway don't discard advises from others directly. You made this and made it open source, of course people will come to you with suggestions. Learn to handle it.

And never never catch and throw another exception. Instead of making a defence speech of "This is an opensource library, made by only one person, not an enterprise application for IBM." say "Sure I am aware of this but this initial version isn't made for production use yet, I have this planed for version X". Learn to work with a community instead of against.

Offline doc

Junior Newbie





« Reply #4 - Posted 2005-08-04 09:50:35 »

You are right. I understand the way that Abuse told me this advice. Probably my not perfect enligh does't help me telling that now it is a simple library. My only thought was that Abuse have seen the source code and the library itself too fast, without testing it.
Now i'm using it i in a little project but i publish it to find other people that like/help me in develop Smiley
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Longarmx (52 views)
2014-10-17 03:59:02

Norakomi (43 views)
2014-10-16 15:22:06

Norakomi (33 views)
2014-10-16 15:20:20

lcass (37 views)
2014-10-15 16:18:58

TehJavaDev (68 views)
2014-10-14 00:39:48

TehJavaDev (67 views)
2014-10-14 00:35:47

TehJavaDev (60 views)
2014-10-14 00:32:37

BurntPizza (73 views)
2014-10-11 23:24:42

BurntPizza (45 views)
2014-10-11 23:10:45

BurntPizza (86 views)
2014-10-11 22:30:10
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!