Open Side Menu Go to the Top

09-01-2012 , 12:40 AM
sdturner, just glanced it over but this looks like very clean well-designed code. excellent work. i didn't see at a glance where the dictionary for comparison is being called to?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **
$25m Guaranteed WPM on CoinPoker
Join the action now
Daily Rewards • Splash Pots • CoinRaces
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **
09-01-2012 , 12:54 AM
Quote:
Originally Posted by gaming_mouse
sdturner, just glanced it over but this looks like very clean well-designed code. excellent work. i didn't see at a glance where the dictionary for comparison is being called to?
Thanks man.

Here's where it is:

Code:
foreach ($words as $w) {
    if (preg_match('/^[A-Z]*$/',$w)) { // filters all caps
    	continue;
    }
    if (!pspell_check($pspell, $w)) {
    	$misspelled[] = $w;
    }
}
It uses the Pspell PHP extension, which actually is just the language binding for the Aspell library.

PHP switched from the old Pspell lib to Aspell in 2003, and so to maintain backward compatibility they just kept using the Pspell named functions, which are just a mask for Aspell.

Last edited by sdturner02; 09-01-2012 at 01:08 AM.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-01-2012 , 10:38 AM
Quote:
PHP switched from the old Pspell lib to Aspell in 2003, and so to maintain backward compatibility they just kept using the Pspell named functions, which are just a mask for Aspell.
That's such a PHP-y solution to a problem
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-01-2012 , 01:49 PM
Quote:
Originally Posted by Zurvan
That's such a PHP-y solution to a problem
Haha, it totally is.

Actually, the reason I'm such a PHP fanboy is because of things like that.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-01-2012 , 02:15 PM
Quote:
Originally Posted by sdturner02
Haha, it totally is.

Actually, the reason I'm such a PHP fanboy is because of things like that.
sd,

i was thinking, how can he write such good javascript and simultaneously love php, and i thought of:


** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-01-2012 , 03:10 PM
I laughed pretty hard at that, well done.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-02-2012 , 05:29 AM
Anyone notice that the front page of HN is dominated by "How I taught a girl to program!" I know that programming is dominated by men, but is it really considered that unlikely / impossible to consider a (OMG!) girl that can program, that this deserves so many blogs and so many front-page votes?

And in the work arena, are women generally forced to be, by default, better than the average guy or is it the opposite: OMG, she can write "Fizz Buzz in less than 30 minutes, she hired!"

Regardless, tyler_cracker seems like a pretty good programmer.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-02-2012 , 07:27 AM
Quote:
We checked several aspects of each of these compromised websites and concluded that most of them are served by Apache webserver and PHP environment. As you can see in the pie chart below, PHP dominates the server side:



Initially, when we discovered the attack, we found only WordPress sites, and after a week or so, the picture did not change that much. WordPress still serves the majority of the compromised websites; however, we did see a small amount of other CMS as well. We also noticed that an increasing number of Joomla sites
Obviously PHP is to blame here. My God man, it's running on 94% of sites that use Wordpress and Joomla!
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-02-2012 , 08:06 AM
I'll repeat it once again. It's a mindset issue. PHP makes it really easy to pick up lolbad habbits. Doesn't mean that PHP can't be used to build awesome stuff just means that it's really likely it will also be used to build heaps of ****.

random note: I bought "Agile in a Flash" and it arrived Saturday. It's a pretty strange purchase because i have no need for "yet another Agile XYZ" but the format seems interesting. I basically bought it to see if I could turn info from some book I read into similar flashcards. Seems like that would really make the stuff stick in your brain. Been maybe half a year or so since i read my last Agile stuff some some refresher may be ok as a sidebenefit.

Last edited by clowntable; 09-02-2012 at 08:33 AM.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-02-2012 , 09:19 AM
Wasn't meant to offend, but I do have to question why WP would be insecure out of the box like that. I looked into it further, and there were quite a few posts about "OMG, my site is hacked!" and the general attitude was "Be careful the plug-ins you install." I mean, because some blogger is using WP because it promises ease-of-use. Poor code base shouldn't be their responsibility or issue.

I was watching some Google talks, and two of the people on stage who were presenting had blogs on WP, and they both had their sites hacked as well. Two Google employees are hacked?

Anyways, I can't talk at all. I tried for the past week to create a login page, and I couldn't get it to work. If you'd like to see my epic fail:

https://github.com/dt1/noirKormaLogin

I guess being extremely hard to implement this is a good thing. Keeps idiots like me from creating insecure websites. Now, I'll go back to studying and licking my wounds. What a waste of time!

edit: I did seek guidance from SO in this one. My total rep, after asking this one question is 23. I suspect that number is going to go to -23 soon.

Last edited by daveT; 09-02-2012 at 09:35 AM.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-02-2012 , 10:44 AM
daveT, no worries dude, I didn't at all think you were being snarky or anything.

I was actually making a joke about the writer presenting the findings of his analysis, complete with a pie chart, which concluded that 94% of WP/Joomla sites run PHP.

That's amusing because Wordpress and Joomla are both written in PHP. Picturing the author not knowing this, and then getting really excited about his "breakthrough" after spotting a pattern, made me chuckle.

My main point was only that people like the author often mistake badly written code as a shortcoming of the language. That's nonsense. A programming language is nothing more than a tool for accomplishing a task.

And I think you're right about WP. WP plugins are everywhere, and I'd bet that more often than not, users install them without reviewing any of the code. I mean, it's literally called a "plugin", which seems to suggest that reviewing the code, even if you understood it, isn't necessary.

Quote:
Originally Posted by daveT
Anyways, I can't talk at all. I tried for the past week to create a login page, \
I guess being extremely hard to implement this is a good thing. Keeps idiots like me from creating insecure websites. Now, I'll go back to studying and licking my wounds. What a waste of time!
See, I look at it differently. I like simplicity. It seems to me that as a task becomes increasingly complex, the likelihood of an oversight increases. I take flak for it, but that's part of why I like PHP.

You're making a login page that's supposed to authenticate users before allowing them to proceed to a protected area, right? That's incredibly easy to do with PHP. And done properly, you can create achieve a very high level of protection.

inb4 snarky post with link to "fractal of bad design"
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-02-2012 , 11:01 AM
I never once bashed into PHP. And to be fair, I'm doing this in a language I know nothing about outside of it being a Lisp. I would struggle like mad to do it in PHP as well, I am sure.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-02-2012 , 11:25 AM
Quote:
Originally Posted by daveT
I never once bashed into PHP. And to be fair, I'm doing this in a language I know nothing about outside of it being a Lisp. I would struggle like mad to do it in PHP as well, I am sure.
That last "inb4" line wasn't at all meant to you, I should have been more clear. It was just in general.

It's actually rather amusing, but it seems anytime someone mentions PHP on the internet, there are people who suddenly hear the call to action and begin attacking it. Like almost as if it were a person or something. The "fractal" article is nearly always offered as evidence of it's worthlessness.

I've never used clojure either. In fact, I was browsing through your code for a few moments and felt intimidated at the thought of trying to figure it how it works.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-02-2012 , 12:17 PM
Stay away from Minecraft if you value your free time. At all.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-02-2012 , 12:48 PM
Quote:
Originally Posted by sdturner02
That last "inb4" line wasn't at all meant to you, I should have been more clear. It was just in general.

It's actually rather amusing, but it seems anytime someone mentions PHP on the internet, there are people who suddenly hear the call to action and begin attacking it. Like almost as if it were a person or something. The "fractal" article is nearly always offered as evidence of it's worthlessness.

I've never used clojure either. In fact, I was browsing through your code for a few moments and felt intimidated at the thought of trying to figure it how it works.
Eh, I felt the same way when I saw your code..

I'd gladly explain that code: you'll either think its awesome or you'd want to blow your brains out.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-02-2012 , 01:42 PM
Quote:
Originally Posted by daveT
Regardless, tyler_cracker seems like a pretty good programmer.
thanks!

i'm not a girl fwiw.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-02-2012 , 02:44 PM
Quote:
It's actually rather amusing, but it seems anytime someone mentions PHP on the internet, there are people who suddenly hear the call to action and begin attacking it. Like almost as if it were a person or something. The "fractal" article is nearly always offered as evidence of it's worthlessness.
Yes people like me. I think PHP is crap because it ends up ruining many people who could have turned out to be decent programmers. Yes it's just a tool and good programmers will write good PHP code but if I get a random pool of people and one is a PHP coder i'd say chances are better than rand that he's the worst when it comes to some pretty fudamental things.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-02-2012 , 03:04 PM
Quote:
Originally Posted by clowntable
Yes people like me. I think PHP is crap because it ends up ruining many people who could have turned out to be decent programmers. Yes it's just a tool and good programmers will write good PHP code but if I get a random pool of people and one is a PHP coder i'd say chances are better than rand that he's the worst when it comes to some pretty fudamental things.
yeah i have to say now that i know ruby better i think php is a lot less acceptable than i did when i using it daily. i can't imagine many people who know both languages would choose php.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-02-2012 , 03:39 PM
Scathing?

Quote:
So how can you protect yourself? Here are some of the dominant attack vectors that websites using the latest WordPress version are likely to be exploited through:

* Weak passwords / stolen credentials
* Vulnerable third-party modules used in WordPress
* Security holes in the underlying server infrastructure, such as in the database server or the server side scripting engine (PHP in this case)
So most of the dominant attack vectors have nothing to do with using Wordpress or Joomla? Heh.

Point 2 is like blaming Microsoft if that shareware you downloaded contains a virus.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-02-2012 , 06:35 PM
PHP's biggest problem is the fact that anybody can learn to code in it, and the ****ty developers can never learn anything else. It tends to collect the worst developers, who frequently don't even know they're terrible and thus aren't ashamed of sharing their awful code.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-02-2012 , 10:59 PM
so im trying to learn java (again) and the transition from C# to java is > C++ to java fwiw. one queston I cant seem to google the answer to: in C# if i had blah.app.input.mouse.button (which could be enum left, right, or middle) i could do "using mButton = blah.app.input.mouse.button;" at the top of the code (or somthing like that) then I could just do: "if(buttonDown == mButton.left) thatsAClick;."

how do I do this in java? (basically, save myself from writing an essay every time i wanna refrence somthing)
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-02-2012 , 10:59 PM
Quote:
Originally Posted by clowntable
Yes people like me. I think PHP is crap because it ends up ruining many people who could have turned out to be decent programmers.
So your're arguing that, but for their exposure to PHP, there are many bad developers who would have otherwise turned out to be good developers had they not ever written their first <?php tag?

You said that PHP is only a tool. I agree. But I cannot agree with the notion that a tool is less valuable simply because there are people who use it incorrectly.

Quote:
Originally Posted by clowntable
if I get a random pool of people and one is a PHP coder i'd say chances are better than rand that he's the worst when it comes to some pretty fudamental things.
If it's just a random group of people, yeah probably. Its years of use on the web, enhanced by the hordes of people who have gained some knowledge solely because they use Wordpress, suggests a likelihood that there are a lot of people out there who have some knowledge of it, but aren't proficient.

But if you take a group of developers in similarly situated employment positions, only distinguishable by the language they use professionally, bet the house that the PHP dev is a superior programmer. For the exact same reason as group A.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-02-2012 , 11:02 PM
oh and if anyone here uses libgdx and wouldn't mind answering a few questions plz pm me xD
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-02-2012 , 11:06 PM
Quote:
Originally Posted by Zurvan
PHP's biggest problem is the fact that anybody can learn to code in it, and the ****ty developers can never learn anything else.
PHP, like all languages, has shortcomings. The fact that it's easy to learn and use is not one of them.

Quote:
Originally Posted by Zurvan
who frequently don't even know they're terrible and thus aren't ashamed of sharing their awful code.
So because there are people in the world who lack a sense of self-awareness and grace, this means that PHP is a terrible programming language?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **
$25m Guaranteed WPM on CoinPoker
Join the action now
Daily Rewards • Splash Pots • CoinRaces
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

      
m