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

08-15-2012 , 10:28 AM
Quote:
Why does someone want to pay $40/month for VPS hosting when they can get a shared host for $4/month with CMS pre-installed?
This is actually interesting because those cheap $4-7ish/month hosts usually come with seriously insane rules and are borderline false advertising.

Sure they advertise themselves as $5/month with unlimited bandwidth and space but as soon as your site gets some traction they are going to shut you down. By the time you can take advantage of their unlimited GB/month you've already passed the point where you get shut down notices.

First they'll offer you a chance to upgrade to their premium package which is probably going to cost $30ish a month which is really just a crappy VPS. If you don't upgrade, you get shut down.Between cloud hosting and VPS hosting it is not hard to find something affordable and you also have the benefit of having no restrictions if you go the VPS route.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
08-15-2012 , 11:17 AM
Your assumption is that all sites grow.

This is not the case.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
08-15-2012 , 01:00 PM
Quote:
Originally Posted by Neil S
Your assumption is that all sites grow.

This is not the case.
There are a ton of options for affordable VPS/cloud hosting that are close to free. If you have a site that's not going to grow and you expect almost no traffic then you should use one of those pay by the hour hosts and it would probably be less than $1/month.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
08-15-2012 , 01:33 PM
Signed up for Trello to manage my stuff to do at work. Pretty excellent. Simple yet good enough and free...I likey
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
08-15-2012 , 02:37 PM
Sorry, but this is likely the funniest thread on programming I've ever read:

What is the best comment in source code you have ever encountered?

Quote:
// somedev1 - 6/7/02 Adding temporary tracking of Login screen
// somedev2 - 5/22/07 Temporary my ass
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
08-15-2012 , 02:47 PM
Quote:
Originally Posted by clowntable
Signed up for Trello to manage my stuff to do at work. Pretty excellent. Simple yet good enough and free...I likey
Trello is cool, you should check out asana too. Also free and the best project management tool I've found -- and I've looked at a lot of them
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
08-15-2012 , 02:52 PM
Quote:
Originally Posted by daveT
Sorry, but this is likely the funniest thread on programming I've ever read:

What is the best comment in source code you have ever encountered?
Reminds me of this http://www.nextthing.org/archives/20...h-http-headers
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
08-15-2012 , 03:00 PM
Quote:
Originally Posted by Shoe Lace
I've had WP themes bring sites down to their knees too. My friend changed themes on his blog once and the entire site started to take 15 seconds to load. He ended up changing themes, but it seems crazy to me that the visual aspect of the site can negatively affect the performance of the site that bad.
Really? It comes as a surprise to you, one who has previously complained about the bloat of jquery, that someone could assemble an asston of broken html+css+js that might take a while to load? Again this seems to be complete unfamiliarity with WP, like you are imagining a theme to be a small config file with a few variables for "show_sidebar=true", "primary_color=#ff3344". It's not like that. A Wordpress theme is the entire output of the site, bar content. All the HTML, CSS, JS (if desired) comes from the theme. Also PHP if you want to do some server side logic in there too.

Quote:
CMS themes and modules suffer the same problem as jquery plugins. More often than not some random idiot coded it and it's 98% garbage. I don't want to be forced into investigating every line of code for every module just to make sure it's not broken.
And yet these are not the only choices, there's an obvious third option. If you would rather write something from scratch on order to avoid having to debug idiot-coded garbage, your choices are not limited to "Use wordpress, download idiot-coded garbage themes and plugins until one is acceptable" or "write my site entirely from scratch using no third-party code ever". If you're capable of option B then why not write your own themes and plugins to begin with?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
08-15-2012 , 03:08 PM
Code:
// 
// Dear maintainer:
// 
// Once you are done trying to 'optimize' this routine,
// and have realized what a terrible mistake that was,
// please increment the following counter as a warning
// to the next guy:
// 
// total_hours_wasted_here = 39
//
lol

EDIT: lrorlfollforlolol

Code:
/**
 * Always returns true.
 */
public boolean isAvailable() {
    return false;
}
oh god i can't get enough of these
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
08-15-2012 , 03:12 PM
Quote:
Originally Posted by _dave_
Really? It comes as a surprise to you, one who has previously complained about the bloat of jquery, that someone could assemble an asston of broken html+css+js that might take a while to load? Again this seems to be complete unfamiliarity with WP, like you are imagining a theme to be a small config file with a few variables for "show_sidebar=true", "primary_color=#ff3344". It's not like that. A Wordpress theme is the entire output of the site, bar content. All the HTML, CSS, JS (if desired) comes from the theme. Also PHP if you want to do some server side logic in there too.



And yet these are not the only choices, there's an obvious third option. If you would rather write something from scratch on order to avoid having to debug idiot-coded garbage, your choices are not limited to "Use wordpress, download idiot-coded garbage themes and plugins until one is acceptable" or "write my site entirely from scratch using no third-party code ever". If you're capable of option B then why not write your own themes and plugins to begin with?
The hang time was because an sql query was taking forever, it had nothing to do with the css or html. I know that it has to include all of that stuff to work as a theme, but that makes it even worse IMO.

If I want to change how something looks, I shouldn't worry about some designer not understanding why it's bad to fiddle around with queries that might crush the site but with the way WP does themes, I'm automatically forced to worry about it.

Yeah for every 50 bad plugins there's going to be a decent one. If you go down the route of writing your own plugins and themes, why even bother with the CMS? If you're going to do all of the coding yourself, you might as well just use rails/django/whatever you use.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
08-15-2012 , 03:41 PM
Quote:
Originally Posted by gaming_mouse
Trello is cool, you should check out asana too. Also free and the best project management tool I've found -- and I've looked at a lot of them
Yeah Asana was already too heavy for my purposes. This is pretty much pure time management i.e. my entry today was something along the lines of

Correct exams
Research some AI journals
Answer mail froms student
Answer mail from coworker
Implement+commit first iteration of hand evaluation helpers
Get date/room for second date exam from PA
Prepare second date exams
QM on lecture slideset #1

It also seems really usefull for organizing my reading. I usually tend to read 3-4 books/journals whatever at a time. For now I just added each book with a checklist containing basically the table of contentes
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
08-15-2012 , 04:13 PM
Is there any reason why my application runs much slower on ubuntu than it does on win7 (both are 64bit) ?
I get about 10-15 fps on windows, and only about 3 fps on ubuntu.
Application is made with OpenCV, openMP and c/c++, it's basically getting images from webcam and tries to find a hand in "real time".

this is the most resource demanding part of the code http://codepad.org/R1XAn5nQ

maybe it's webcam drivers that are not so good for ubuntu, i really dont know...
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
08-15-2012 , 05:02 PM
Code:
// Replaces with spaces the braces in cases where braces in places cause stasis
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
08-15-2012 , 06:56 PM
The Carmack reverse comments are awesome. Search for "quake 3", it's too long to paste.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
08-15-2012 , 07:01 PM
Seeing so many weird custom license plates in VA. KURIBO, CHUN LI, and today's biggie: OODB.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
08-15-2012 , 08:32 PM
is there a free alternative to mono? https://store.xamarin.com/
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
08-15-2012 , 11:25 PM
Very nice talk on Python in scientific computing/data analysis http://www.youtube.com/watch?v=mLuIB...ature=youtu.be
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
08-15-2012 , 11:34 PM
Some more funnies, though parts of it was in the earlier link:

http://stackoverflow.hewgill.com/questions/140/270.html

Code:
ALTER PROCEDURE ORly 
AS

print ' {o,o}'
print ' |)__)'
print ' -"-"-'
print 'O RLY?'
print ' '
print '{o.o}'
print '|)_(|'
print '-"-"-'
print 'YA RLY'
print ' '
print ' {o,o}'
print ' (__(|'
print ' -"-"-'
print 'NO WAI!'
Code:
while ("my guitar gently weeps") {
...
}
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
08-16-2012 , 12:01 AM
Quote:
Originally Posted by hrvoje07
Is there any reason why my application runs much slower on ubuntu than it does on win7 (both are 64bit) ?
I get about 10-15 fps on windows, and only about 3 fps on ubuntu.
Application is made with OpenCV, openMP and c/c++, it's basically getting images from webcam and tries to find a hand in "real time".

this is the most resource demanding part of the code http://codepad.org/R1XAn5nQ

maybe it's webcam drivers that are not so good for ubuntu, i really dont know...
Inside the for for for loop. I'm guessing cvSet2D is a library call? Libraries are often more optimized for Windows because of larger use base, driver support, etc.

Creating the stack object HighlightPixel every time. Windows compiler might be optimizing that way. Creating (possibly expensively) an object, to only set 2 integer fields in the object. Maybe there is a better approach.

Also I'm guessing STL implementation performance can vary. Do you really need a set<> structure?


Code:
cvSet2D(img,i,j,selectX);
HighlightPixel p;
p.i = i;
p.j = j;
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
08-16-2012 , 06:34 AM
Quote:
Originally Posted by muttiah
Inside the for for for loop. I'm guessing cvSet2D is a library call? Libraries are often more optimized for Windows because of larger use base, driver support, etc.

Creating the stack object HighlightPixel every time. Windows compiler might be optimizing that way. Creating (possibly expensively) an object, to only set 2 integer fields in the object. Maybe there is a better approach.

Also I'm guessing STL implementation performance can vary. Do you really need a set<> structure?


Code:
cvSet2D(img,i,j,selectX);
HighlightPixel p;
p.i = i;
p.j = j;
Thanks for help!

i tried to comment out stuff you suggested and then check performance, it appears the problem is with
Code:
for(int x = 0; x < PROFILE_SIZE; ++x)
                {
                    if(compareColor(color,profile[x],50))
                       {
                        //stuff
                        }
                }
i decreased PROFILE_SIZE from 500 to 100 and it runs smoothly now.
i guess this function just runs much slower on linux for some reason
Code:
bool compareColor(CvScalar first, CvScalar second, int threshold)
{
    return ( (abs(first.val[0] - second.val[0]) < threshold) && (abs(first.val[1] == second.val[1]) < threshold) && (abs(first.val[2] == second.val[2]) < threshold) && (abs(first.val[3] == second.val[3]) < threshold) );
}
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
08-16-2012 , 07:20 AM
Quote:
Originally Posted by Neko
Very nice talk on Python in scientific computing/data analysis http://www.youtube.com/watch?v=mLuIB...ature=youtu.be
Nice. Looking forward to watching this.

Another good one - Learning R via Python [PDF]
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
08-16-2012 , 10:27 PM
Quote:
Originally Posted by hrvoje07
Thanks for help!

i tried to comment out stuff you suggested and then check performance, it appears the problem is with
Code:
for(int x = 0; x < PROFILE_SIZE; ++x)
                {
                    if(compareColor(color,profile[x],50))
                       {
                        //stuff
                        }
                }
i decreased PROFILE_SIZE from 500 to 100 and it runs smoothly now.
i guess this function just runs much slower on linux for some reason
Code:
bool compareColor(CvScalar first, CvScalar second, int threshold)
{
    return ( (abs(first.val[0] - second.val[0]) < threshold) && (abs(first.val[1] == second.val[1]) < threshold) && (abs(first.val[2] == second.val[2]) < threshold) && (abs(first.val[3] == second.val[3]) < threshold) );
}
That makes way more sense now. I have seen performance issues with the C abs function at our company. Some compilers give really poor performance (even visual c++ compiler has had this issue). In general want to avoid stuff that does expensive floating point operations.

Are first.val[] integers? There are tricks to calculating integer absolute values that are much faster (but you will have to get dirty with bit operators).

Another problem is implicit conversion. iirc abs returns double/float and you're comparing to the integer threshold. Just some thoughts, I could be way off here.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
08-17-2012 , 01:31 PM
Update on my self management (reading Getting Things Done on the side):
(Currently only for work where I use a laptop I bring in+home)

Thunderbird+Lightning for mail+calender, Lightning is synched to Google calender. Seems pretty neat because I can keep work/private in one place and synched that way.
Added dropbox because why not in case I need to store files accessable from both.

My Trello setup:
Board 1: "Next" with Lists "To Do","Doing","Done"
Basically the main board where stuff gets done
Board 2: Books with a List for every book I want to read/am reading. I just add a card for each chapter i.e. GTD: Chapter 1 and move it to "Next" whenever I want to shedule reading time.
Board 3: Private with Lists "Finance+Contracts", "Home", "Contacts", "Free time" and "Misc" will probably get rearanged a bit but the idea is to move all private stuff here and then move the cards to work on to next
Board 4: Work with Lists "AI lecture", "Programming project", "Online course", "Misc" once again likely to change
Board 5:: Long Term Ideas etc with one list for everything "on the backburner" like future programming projects, books and so forth

Dunno how good that'll work but it seems decent so far. Basically the idea is to file everything in either private or work (ideas go to long term, books to books) and then move cards over to next to organize what to do next.

For my PhD I think I'll do an extra board with lists for research, writing of each chapter and so forth. I might also turn the book I plan on writing/finishing into an extra board and have lists like "Plot","Character development","Research" and so forth

I don't own a smartphone, going to buy one around the time the iPhone 5 comes out. I prefer Android for many reasons but I'll wait just to check it out/maybe prices for other phones drop etc.
The idea is obviously to have everything in synch with that. Trello has apps for iPhone and Android phones which is good and mail+calender should work reasonably well. Seems like there is no Thunderbird mobile though, is that right or am I too blind?

I've never really used a calender before FWIW. Just kept the stuff in my head or scribbled some notes for important days I can't miss+every now and then used the calender that comes with the Os.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
08-17-2012 , 01:42 PM
The gmail app on iOS is very good and there isn't a reason to think it wouldn't be good on Android.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
08-17-2012 , 01:58 PM
Quote:
Originally Posted by kerowo
The gmail app on iOS is very good and there isn't a reason to think it wouldn't be good on Android.
yeah i like it
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote

      
m