Open Side Menu Go to the Top
Register
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

11-15-2013 , 08:12 AM
you defined mark as a local variable rather than as a member variable.

also:

Code:
import java.util.Scanner; //importing the scanner class
really?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-15-2013 , 09:46 AM
thanks, and we have to comment the most trivial things just to display an understanding -_- In other words, it isn't for my benefit lol

I edited the code but it still won't compile because apparently an identifier is expected on the following lines:

public static String determineGrade(mark)

public static void gradeMessage(grade)

I'm pretty sure this solves the problem you highlighted right?:

Code:
public static int getMark()
{
    Scanner in = new Scanner(System.in);
    System.out.print("Enter exam mark :> ");
    int mark = in.nextInt();
    
    return mark; 
}

Last edited by ProdigyXII; 11-15-2013 at 09:51 AM.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-15-2013 , 10:03 AM
No, it doesn't. Just google member variables. Although you aren't even creating an instance of your class right now.... But basically, the line "getMark()" in your main method is doing nothing.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-15-2013 , 10:06 AM
okay, thanks
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-15-2013 , 12:22 PM
Are there hard and fast rules to when a table is getting too many columns?

I have a huge table (like 25 columns) and really don't know much about when it's getting too big.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-15-2013 , 12:26 PM
I work with tables at work that have 150+ columns.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-15-2013 , 12:36 PM
Quote:
Originally Posted by splashpot
I work with tables at work that have 150+ columns.
In that case I will stop thinking about it.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-15-2013 , 12:43 PM
Just make sure all your styling of the table is done in external CSS (last time I looked repeated inline CSS in large tables really slows their loads down and is a bad user experience)
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-15-2013 , 12:50 PM
Hi Guys,

On one of my websites, there are certain areas of text which get updated fairly often (think welcome message on the home page which gets updated about every 3-4 days). At the moment, the text is hard coded and I have to manually edit the template to change it.

I would like to move to a cms style solution where the text is stored in a database, and I have a web interface to edit it, but I cant seem to find the right solution.

Everything I have come across so far is a fully fledged CMS. All I am looking for is a basic content control system which allows me to update certain fields in a database via a WYSIWYG. It wouldnt take long to build something like this myself, but I cant believe it doesnt already exist. Ideally, it would have versioning as well.

Any ideas?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-15-2013 , 12:51 PM
Quote:
Originally Posted by Gullanian
Just make sure all your styling of the table is done in external CSS (last time I looked repeated inline CSS in large tables really slows their loads down and is a bad user experience)
I meant sql database tables, not html. Guess I should have specified.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-15-2013 , 12:51 PM
Quote:
Originally Posted by Nchabazam
In that case I will stop thinking about it.
I will add that some of these 150+ column tables actually needed to be even larger, like 300-400 columns, so they did create a second extension table. So the table becoming too large was a concern at one point.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-15-2013 , 12:53 PM
Quote:
Originally Posted by MrWooster
Hi Guys,

On one of my websites, there are certain areas of text which get updated fairly often (think welcome message on the home page which gets updated about every 3-4 days). At the moment, the text is hard coded and I have to manually edit the template to change it.

I would like to move to a cms style solution where the text is stored in a database, and I have a web interface to edit it, but I cant seem to find the right solution.

Everything I have come across so far is a fully fledged CMS. All I am looking for is a basic content control system which allows me to update certain fields in a database via a WYSIWYG. It wouldnt take long to build something like this myself, but I cant believe it doesnt already exist. Ideally, it would have versioning as well.

Any ideas?
For rails at least, something like http://jejacks0n.github.io/mercury/ would fit the bill (basically a super jacked up WYSIWYG editor).

There must be something similar as an open source solution.

edit: obviously you can use it without rails https://github.com/jejacks0n/mercury...-without-Rails
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-15-2013 , 01:18 PM
Quote:
Originally Posted by Nchabazam
For rails at least, something like http://jejacks0n.github.io/mercury/ would fit the bill (basically a super jacked up WYSIWYG editor).

There must be something similar as an open source solution.

edit: obviously you can use it without rails https://github.com/jejacks0n/mercury...-without-Rails
Just read through the docs. Pretty much exactly what I am looking for, my project is not rails based but hopefully installation wont be too difficult.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-15-2013 , 02:59 PM
Quote:
Originally Posted by ProdigyXII
thanks, and we have to comment the most trivial things just to display an understanding -_- In other words, it isn't for my benefit lol
and yet you didn't write a single comment anywhere else. also, that comment displays the exact opposite of "an understanding".

Quote:
Originally Posted by Nchabazam
In that case I will stop thinking about it.
just because someone else in the world has committed an atrocity worse than your own doesn't mean your atrocity is not an atrocity.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-15-2013 , 03:06 PM
I dont' have enough database experience to know if it is or isn't an atrocity, but my company is a pretty large successful e-commerce company and it's working for us. I have a hard time imagining a way our tables would work with <25 columns.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-15-2013 , 03:06 PM
Quote:
Originally Posted by tyler_cracker
just because someone else in the world has committed an atrocity worse than your own doesn't mean your atrocity is not an atrocity.
Is a 25 column database table an atrocity?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-15-2013 , 03:25 PM
pretty hard to answer that without knowing what you're modeling and how.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-15-2013 , 03:40 PM
I think it's modeled reasonably well... just has a lot of information that needs filling out. It's all related to the one object.

I really just have no sense of these things since I'm self taught and too lazy to read anything.

I was thinking more along the lines of performance when a table gets too big, but it sounds like it can take a lot more than 25 columns before it becomes a big problem.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-15-2013 , 03:50 PM
I'm only familiar with table column limitations for MySQL, for which this may be useful:

http://dev.mysql.com/doc/refman/5.0/...unt-limit.html

In the product I work on there are at least a few tables with 50+ columns where I wouldn't consider it to be some kind of glaring fault
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-15-2013 , 03:52 PM
Quote:
Originally Posted by well named
I'm only familiar with table column limitations for MySQL, for which this may be useful:

http://dev.mysql.com/doc/refman/5.0/...unt-limit.html

In the product I work on there are at least a few tables with 50+ columns where I wouldn't consider it to be some kind of glaring fault
Cool, I'll check that out. Thanks.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-15-2013 , 04:14 PM
Quote:
Originally Posted by LirvA
Thanks for the responses on my pentest questions, all. I have a couple other questions.

What is the best resource for learning python? Also, is this the best resource for learning HTML?
http://www.w3schools.com/HTML/
https://developer.mozilla.org/en-US/

Great resource for HTML/CSS/JS.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-15-2013 , 04:20 PM
Quote:
Originally Posted by splashpot
I dont' have enough database experience to know if it is or isn't an atrocity, but my company is a pretty large successful e-commerce company and it's working for us. I have a hard time imagining a way our tables would work with <25 columns.
I'm gonna blindly assume they are doing it this way for a reason.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-15-2013 , 04:32 PM
Quote:
Originally Posted by Nchabazam
I think it's modeled reasonably well... just has a lot of information that needs filling out. It's all related to the one object.

I really just have no sense of these things since I'm self taught and too lazy to read anything.

I was thinking more along the lines of performance when a table gets too big, but it sounds like it can take a lot more than 25 columns before it becomes a big problem.
yeah it's quite unlikely performance will be a problem, but it's fairly likely your model isn't as good as you think. but whatever, 25 columns isn't that much.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-15-2013 , 06:03 PM
25 columns probably not a big deal, but it's never a bad idea to think about your structure if you have the time.

One example that's always grinded my gears is PokerTracker 3/4, which if you've ever used you'll know can get horrendously slow at most operations after the hand count gets moderate, when using mechanical disks. Imo a great deal of this is due to the size of the tables, which can end up needing to read multiple GB of data from disk, which is slow.

Look at the structure of one of the primary tables, "tourney_hand_player_statistics" - a 237 column monstrosity. Observing it in PGAdmin you can see it is broadly split up in to 4 areas - preflop, flop,turn and river. A quick query run on my database (mostly HU! it's far worse in other games where a player may have a much lower VPIP) suggests only 42% of hands ever see a flop, and then <30% for turn and river. So here is a fine example - the vast majority of the many gigabytes read for common queries is just "couldn't happen" - irrelevant, completely unneccesary storage. There is no reason to store the effective stack size on the river for a player who folded preflop, for example.

So, ask yourself - are there columns in my 25 that rarely contain data? if so, maybe think about breaking that out in to another table.

edit: of course splitting this example in to seperate tables makes it no longer so easy to query "average saw river", joins (or trickery) will be needed - which is a tradeoff that may or may not be worth making, as that'll impact performance too.

Last edited by _dave_; 11-15-2013 at 06:09 PM.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-15-2013 , 06:11 PM
Quote:
Originally Posted by gaming_mouse
yeah it's quite unlikely performance will be a problem, but it's fairly likely your model isn't as good as you think. but whatever, 25 columns isn't that much.
Nonsense, I'd never data-model something incorrectly :P

Quote:
Originally Posted by _dave_
25 columns probably not a big deal, but it's never a bad idea to think about your structure if you have the time.

One example that's always grinded my gears is PokerTracker 3/4, which if you've ever used you'll know can get horrendously slow at most operations after the hand count gets moderate, when using mechanical disks. Imo a great deal of this is due to the size of the tables, which can end up needing to read multiple GB of data from disk, which is slow.

Look at the structure of one of the primary tables, "tourney_hand_player_statistics" - a 237 column monstrosity. Observing it in PGAdmin you can see it is broadly split up in to 4 areas - preflop, flop,turn and river. A quick query run on my database (mostly HU! it's far worse in other games where a player may have a much lower VPIP) suggests only 42% of hands ever see a flop, and then <30% for turn and river. So here is a fine example - the vast majority of the many gigabytes read for common queries is just "couldn't happen" - irrelevant, completely unneccesary storage. There is no reason to store the effective stack size on the river for a player who folded preflop, for example.

So, ask yourself - are there columns in my 25 that rarely contain data? if so, maybe think about breaking that out in to another table.
Interesting thought on breaking out columns of rarely used data. Is this a pretty common practice?

There are definitely some fields I could condense, but I think it suffers from making it harder to understand for newer devs. I'm consulting for a start up, and using something like a bitmask to condense a few booleans doesn't seem quite worth it at the moment.

It really is just a pretty big form, and all the fields are mandatory-ish. Not saying it couldn't be cleaned up, but we have a ton of functionality to build before mid December, and I'm more or less the only dev working remotely full-time at the moment.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote

      
m