Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Ender

Pages: 1 ... 112 113 [114]
1696
General Programming / [Java] Question on java.nio.channels package
« on: January 15, 2006, 11:05:23 pm »
I posted this on vL too, so I'll just link you. Look at my third post after I fixed the problem iago found in my sample code.
http://forum.valhallalegends.com/index.php?topic=13927.0

1697
General Programming / Re: [MASM32] Basic Question
« on: December 25, 2005, 05:56:20 pm »
Ok, thanks guys.

1698
General Programming / [MASM32] Basic Question
« on: December 25, 2005, 01:55:14 pm »
Hm, I posted this on the vL site, and then I realized, what better site to ask an assembly question than this! But, practically thinking, I want the fastest answer  ;D. So here's my question/story:

Today a friend told me that mASM32 is not "pure assembly." He says this because it has constructs like print chr$("..."), etc. Is this true, and if so, does mASM32 have all the functionality of "pure assembly"? Also, what do you guys use?

1699
General Discussion / Telnet problems...
« on: November 26, 2005, 06:13:05 pm »
I've been trying to telnet lately and I haven't been able to. I'm using the Windows client, and using the command:
Code: [Select]
o useast.battle.net 6112
What I get is:
Code: [Select]
Connecting to useast.battle.net...

And it stays that way for FOREVER. What's interesting is that when I type in an incorrect port, it tells me (after about 2 or so minutes (literally)) "connection to host failed." This seems to imply that the server I am connecting to doesn't support telnet, but I was almost sure that bnet did.

I've tried other supposedly telnet-supported servers, and it doesn't work. I checked out my router settings, and I didn't find anything prohibiting the telnet protocol. I doubt my cable modem would prohibit it. I also tried typing in a bnet ip address for telnet, and that didn't work too, so it's not a DNS problem...

My questions: from reading this, do you see that I'm doing something wrong? If not, can you tell me a telnet-supported server ip/hostname that you have recently connected to via telnet so I can verify that it's not the server, but instead my client or router?

EDIT

Oh yea, I have tried telnetting from all the computers on my network. Which is why I have limited it to being a problem on the router or the server.

1700
Botdev / Re: JBBE!
« on: November 24, 2005, 09:41:24 pm »
gj joe.

Don't go to vc++ ! Stay with Java ! Or is it too strong for you ? (not derogatory, a joke reference to coffee, tea, and their reflection on manliness...)

1701
General Programming / Re: [JAVA] Easy-To-Use Socket Interface
« on: November 23, 2005, 05:56:28 pm »
Few suggestions:

1. You may want a disconnect method (sorry if you have one already, and I don't see it).

2. Your data is better off being private, to adhere to concept of encapsulation. It is good that you made your makeStreams() method private, as the user/object will never be using that. Similarly, the user will never be using the first four fields. It is best to keep your data private and have a public interface instead, so that if you have to change your object's data, then these changes will be kept local, since you will already have a set-in-stone interface that other objects know about that will change/access the data.

3. There are ways of designing java programs that minimize the amount of static stuff that you need. From your code I see that parts of your GUI (ConsoleUI) and your socket interface are both static. Using the Model-View-Controller (MVC) design pattern, you can optimize a program's OO'ness. Static stuff smells like global variables, and although it is proven that a program can be written completely "staticly" (as you see in procedural programming), in Java it is best to minimize your use of static stuff. The more OOP a program is, the less work you have to do (hm, well, in theory), and the more flexible it is. This becomes much more evident in very large appplications, like the ones that require a team of programmers.

EDIT

* shrugs at posting 16 days after the last post =p *

1702
Trash Can / Re: TAHCBot v4!
« on: November 11, 2005, 01:03:16 pm »
It's quite obvious he just started Java so I don't think it's fair to be askiing someone to write a "well designed OOP program", you want one? Search google.
You can't say you "learned" Java after you write a completely non-OOP program single-source program. And by the way, pointing someone to google is like telling them how to go to the bathroom. You just don't do it. Unless they say like "what's a hard drive." I never asked for an OOP example. I just challenged him to make one.

From his source he isn't thinking VB anymore (which would be almost impossible since Java is almost fully OO) so please name these "habbits" you are referring to.
It's obvious that this was a "test program," to see if he could do it in Java. So I can't fault him much on his OOP because he was probably thinking solely about implementing the logon sequences in Java. But I am giving him good advice - this is not a reflection of his knowledge of Java, but moreso his knowledge of client emulation and procedural programming.

In reading it over, I guess I was mean. So sorry about being mean.

1703
General Programming / Re: [JAVA] Calculate Pi!
« on: November 09, 2005, 08:11:01 pm »
How about pi?

Or (22 / 7) (isn't that supposed to be pi?)

Pi is an irrational number, meaning that it can't be expressed as int / int.
The question is, do you consider "e" to be a number? I believe it is, just an irrational one.

Of course it is. We say the word number when we refer to "real numbers." And irrational numbers are a subset of real numbers.

Infinity isn't a number simply because we can't put numbers to it. It's a concept that helps us understand things. e is used in calculations, however. It's paramount in calculus. Why? Derivative of ln x = 1/x.

1704
Botdev / Re: TAHCBot v4!
« on: November 09, 2005, 06:50:03 pm »
It's a single source code file, which makes it rock.
No, that makes it suck. Write a (G)UI and then show us the code. Or show us an example of a well designed OOP program that you've written. If you can't do one of the above, then you haven't gotten out of your VB habits. The biggest accomplishment that you could make would be to transition from VB to OOP.

Sorry if I'm being harsh =\

1705
General Discussion / Re: Is the death penalty as a punishment moral?
« on: October 29, 2005, 09:22:43 pm »
It has been statistically proven that all three nations which use capitol punishment have higher crime rates than any other countries.

This doesn't mean that capitol punishment cause higher crime rates. It's that the high crime rates cause the countries to use capitol punishment as an answer for murders.

I'm personally undecided. iago says that it was statistically proven to be much of a deterrant, but I would think that it would be one. If those statistics are accurate, then I would say that it would be more advantageous to put these men on therapy in secure jails, in order to find out more about why he killed this person, what things in his life caused him to be a killer... basically do studies on the murderers to find out why they came to be murderers. It would be interesting to see those statistics though.

Pages: 1 ... 112 113 [114]