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

03-01-2013 , 02:11 PM
Quote:
Originally Posted by clowntable
Give the book to a local HS library, put in a "congratulations your life will become awesome" letter and hope soem kid gets inspired imo
This. Libraries are struggling to keep going in many cities and are in dire need of donations.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-01-2013 , 06:08 PM
Clojure 1.5 is now available. Yeah...

I'm going to keep the book for now because I will need something to read on the subway, I'm probably starting a new job next week, and my 7" tablet is awful for reading technical PDFs. It's preferable this way since the book is 80% pencil / paper and it appears the algorithms are easy enough to write by hand.

Then after I am done with it, I'll donate it to a HS library in the ghetto and put the "you're life will be awesome and math isn't scary" letter in it.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-02-2013 , 06:58 PM
While we're on the topic of reading stuff on the subway...let me mention "Ready Player One" again :P
[95% of my train commute reading is non-fiction but this was a notable exception]
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-03-2013 , 07:39 AM
I want to play around with banner adds and amazon affiliate links a bit.

Does anyone have a reliable rough estimate of how much X visitors will generate in google adds money? Surprisingly hard to get info. I realize it's kind of tough to estimate but I just need a really rough ballpark number (1 cent per visitor/month or something). I have kind of 0 clue about this because I've never used adds.

Regarding amazon affiliate stuff..from my research a bit back it seems that you can create an account for each country and then have to redirect people to the right one. Are there any state of the art automation libraries for this?
Basically if someone form Germany visits the site I want to redirect to amazon.de and if the visitor is from the US to amazon.com etc.

I'm sure this is all fairly simple stuff but I spent quite some time googling around and feel none the wiser

For wordpress I found "Amazon Affiliate Link Localizer" which seems to be what I want.

Last edited by clowntable; 03-03-2013 at 07:44 AM.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-03-2013 , 08:46 AM
prices per click / visitor will vary hugely depending on subject matter /content / how optimized towards getting the conversion a site is.

For redirecting to an appropriate offer, I used a IP location database such as this one: http://www.hostip.info/dl/index.html hosted locally - there are some free web APIs, but the best one I've found limits to IIRC 120 access/min, and bans for an hour if exceeding that. Also they can suffer random downtimes which is not ideal for redirecting purposes.

I didn't use anything fancy at all, no plugins. php 302 (or 301?) redirects on the outlinks usually (probably won't work if you're using amazon widgets.

Track everything, a/b test, optimize, repeat It's hard work!
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-03-2013 , 09:07 AM
Quote:
Track everything, a/b test, optimize, repeat It's hard work!
Yeah that's the basic goal behind the project. I want to get good at testing and finding out what stuff works

Thanks for the input.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-03-2013 , 02:38 PM
Hey guys, this is noobish but Id appreciate any advice.

For years I've wanted to make a piece of software that operates as a history/tracker for vidya. It's time to learn a new language and python appeals to me, but I want to make sure Ill be able to do this project once I'm more familiar with the language. Im working my way through udacity and learnpythonhardway at the moment.

Software needs to be able to
-Scrape information from client side results files
--Possibly write some sort of API as all game results will be in different formats and will need to standardize them
-Retrieve online game results from servers
-Have database interaction to store results & run metrics
-Have reasonably verbose & secure interaction with my server for online leaderboard/rankings

Im reasonably certain I can do all of this but will this make for a good project specifically in Python or should I look towards another language?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-03-2013 , 07:26 PM
Quote:
Originally Posted by clowntable
While we're on the topic of reading stuff on the subway...let me mention "Ready Player One" again :P
[95% of my train commute reading is non-fiction but this was a notable exception]
Sounds like another book I've read called Otherland by Tad Williams. Sparked such nerd imagination that it is now a MOORPG as well.

http://www.youtube.com/watch?feature...v=xiPDkMC8APk#!

The only problem is that if you read book one @ 1000pgs, you have to read the entire 4-book series. It isn't a series so much as a unified story, so the books sort of cut off without any resolution until the bitter end.

I truly loved the series when I read it. Quite a Herculean task that is well worth the effort.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-03-2013 , 08:10 PM
I manged to get through Ch 3 yesterday, this time with pencil and paper in hand. I can only say that mathematicians and computer scientists are insanely sick people.

Basically, they start up with this equation, turned to readable form by yours truly:

a%n = a - n(floor(a/n))

I just stared at that just awed by the obviousness and the simplicity of it. Why didn't I think of this?

And then I figured this may or may not work, so I should think about opening up the editor and programming it:

a%n - a = -n(floor(a/n))

(a%n - a)/ -n = floor(a/n)

floor(a/n) = a(1%n - 1)/ -n

But this can't be what the machine is doing if you consider what happens in a register machine..?

And then there's whole bunch of other stuff, with expansions and series and then:



How do people figure this stuff out? Thankfully someone else decided that the Theta was probably e^??



Well, okay, that feels better. I was thinking the expansion would go e to something, but how the hell did they figure out what alpha is?

And then finally, a way to compute Fibonacci numbers:



I'm in absolute awe of how they figure this stuff out. The next section is figuring out lower and upper bounds using The Master Theorem, along with the drawing of the tree and 8 pages of proofs. Maybe by page 300 I'll see some algorithms again.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-03-2013 , 08:42 PM
I'm more impressed by the last formula. That looks like an abstract face.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-03-2013 , 09:43 PM
Probably more impressionistic once you see it in action (MS Paint skillz):



It doesn't look like it should work for Fib(2), but it does. I checked.

They also offer this gem for Fib:



So much better than writing out the recursive function, I think?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-04-2013 , 03:01 AM
Quote:
Originally Posted by clowntable
Does anyone have a reliable rough estimate of how much X visitors will generate in google adds money?
Totally depends on the site, the content and how much work you put in optimizing it. It really is all over the map.

It's not measured per visitor, it's per impression. RPM (revenue per 1,000 impressions) is the metric you'll be tracking.

Here are the historical RPM's for my adsense account (each line is a different site):



Over $50: tax, finance, stocks
$20-50: medical, jobs, tech
$2-$20: products, info, general etc
Under $2: blogs, a forum and sites i haven't optimized at all

Last edited by amberdosh; 03-04-2013 at 03:23 AM.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-04-2013 , 03:54 AM
Quote:
Originally Posted by RiverFenix
Im reasonably certain I can do all of this but will this make for a good project specifically in Python or should I look towards another language?
I think python is a good choice.
Here's a scraper: http://scrapy.org/
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-05-2013 , 07:34 PM
amberdosh:
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-05-2013 , 09:49 PM
Can someone break this down for me.....the "b < 7 - (a/2)" is confusing me...like is there an operation being performed here or a comparison? Has to be otherise "b" would be good until 6? or is there an actual subtraction using b after comparison to 7?

for (int a = 7; a > 0; a -= 2) {
for (int b = 0; b < 7 - (a / 2); b++)
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-05-2013 , 09:57 PM
It's a comparison, it's like an equation except there is a range of answers that satisfy it. Pretend the less than sign is an equal sign and you can treat it pretty much like an equation. There are some rules about changing the direction of the comparison sign but I forget them, maybe when multiplying or something.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-06-2013 , 06:42 AM
If anyone is interested in a great C book, check out:
http://www.scribd.com/doc/39933932/C...ition-K-N-King

The explanations of scanf, printf have been totally amazing so far. The author also has a bunch of exercises that are just challenging to be fun but not so hard as to be discouraging. He pretty much steps you through every nook and crany of the language.

Plus the errors you can create are so much better:

Code:
#include <stdio.h>

int main(void){
  int num1, denom1, num2, denom2, result_num, result_denom;

  printf("Fraction One: ");
  scanf("%d/%d", &num1, &denom1);

  printf("Fraction Two: ");
  scanf("%d/%d", &num2, &denom2);

  result_num = num1 * denom2 + num2 * denom1;
  result_denom = denom1 * denom2;
  
  printf("%d/%d + %d/%d =  %d/%d\n", 
	 num1, denom1, num2, denom2, result_num, result_denom);
  
  return 0;

}
Code:
$ ./addfrac
Fraction One: j/6
Fraction Two: 0/-1216625296 + -1218331915/-1077789652 =  1716999216/-1167315136
Even got some segfaults!
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-06-2013 , 09:27 AM
Quote:
Originally Posted by diarrhea
Can someone break this down for me.....the "b < 7 - (a/2)" is confusing me...like is there an operation being performed here or a comparison? Has to be otherise "b" would be good until 6? or is there an actual subtraction using b after comparison to 7?

for (int a = 7; a > 0; a -= 2) {
for (int b = 0; b < 7 - (a / 2); b++)
FWIW, you can use code tags to preserve indentation.

I was about to type why changing the second comparison wouldn't work, but then I realized a is always odd, so a/2 will always round down. So in real number terms, you have:

Code:
b < 7-(a/2-1/2)
2*b < 14-a+1 == 15-a
a + 2*b < 15
a < 15 - 2*b
But I would leave it was it is. As confusing as the floor division is, I think it's more confusing to change it when b is the variable being changed. And kerowo, the rule you're thinking of is that you must switch the direction of an inequality when multiplying by a negative number, and that multiplying by zero generally invalidates any strict inequality.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-06-2013 , 03:21 PM
Thanks Xhad, it's a long time since Algebra class...
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-06-2013 , 11:02 PM
So I'm a noob when it comes to running a pc. I recently bought a used pc for cheap. It runs on windows xp. I thought I cleared all unnecessary users and denied remote access, but I dug a little deeper and there are a few things that bother me in "groups." I'm afraid of ****ing it up. What's my play?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-06-2013 , 11:10 PM
Lordy, walked through the steps of building and branding an iOS app from a 3rd party developer, what a lot of fiddly bits there are in an iPhone app.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-06-2013 , 11:12 PM
bob i think you'll get better answers in CTH.

Last edited by tyler_cracker; 03-06-2013 at 11:12 PM. Reason: moderated by the noob above me
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-06-2013 , 11:13 PM
I thought about mentioning it but didn't want to appear to be a know it all.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-06-2013 , 11:17 PM
fat chance of that!

:rimshot:
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-07-2013 , 02:30 AM
I've started to do some do some performance comparisons with VS2012 (c++), and it looks to make about 10-15% faster code than the Intel 13.1 compiler. I'm benchmarking using builds of SnG Solver on an 8 core Xeon box, so obviously, ymmv.

By my reckoning this is a pretty big change to the c++ compiler pecking order... my previous experiments showed: Intel 13 > Intel 12 >>>>> VS2010 > VS2008

Sometimes I think I'm the only one in this forum that actually uses c++ on a regular basis... but fwiw, there you go.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote

      
m