Hackaday.com Suggestion for Site

Description of your first forum.

Hackaday.com Suggestion for Site

Postby doctorwho42 » November 10th, 2011, 12:35 am

I have been reading hackaday for awhile, there is one feature i keep coming back to that i think should be implemented.

A button called <Random Hack> that will transport you to a random hack from the archive.

The reason i think this would be a good idea because you guys have had so many posts that its hard to see them all and sometimes i just want to sift through the hacks at random instead of going through the sections or numerical order.

Note: i am not saying do away with old system, i am just saying it would be a nice addition.

-Doctorwho42
doctorwho42
 
Posts: 3
Joined: November 10th, 2011, 12:31 am

Re: Hackaday.com Suggestion for Site

Postby ChalkBored » November 10th, 2011, 1:35 am

Every website needs a random button.
ChalkBored
 
Posts: 35
Joined: January 26th, 2011, 3:31 am

Re: Hackaday.com Suggestion for Site

Postby Tech B. » November 16th, 2011, 3:02 pm

You can do the random thing yourself. HAD posts things by date, so for a url you can pick a random date, like http://hackaday.com/2007/03/12

It will return all post from that day. If you know how to code, you could write a simple script to automatically return a random post from a random day.
User avatar
Tech B.
 
Posts: 11
Joined: January 30th, 2011, 4:05 pm

Re: Hackaday.com Suggestion for Site

Postby UAirLtd » November 17th, 2011, 7:35 pm

Simpler option: it's wordpress, so you can link to a post directly by it's post ID, e.g.

http://hackaday.com/?p=1123

Now just find a way to insert a random number into there, though you'd need to find out and keep updating the maximum value for post ID (it's about 55000 right now).

For example, you could create a bookmark with the following for the location:

Code: Select all
javascript:window.location.href='http://hackaday.com/?p='+Math.ceil(Math.random()*55000);


And this bookmark will take you to a random post every time. In most browsers, you'll have to create a bookmark, and then edit the location manually to the above. Tested working in Firefox, Chrome, Internet Explorer.
User avatar
UAirLtd
 
Posts: 629
Joined: July 19th, 2011, 10:32 pm

Re: Hackaday.com Suggestion for Site

Postby Tech B. » November 17th, 2011, 8:15 pm

UAirLtd wrote:Simpler option: it's wordpress, so you can link to a post directly by it's post ID, e.g.

http://hackaday.com/?p=1123

Now just find a way to insert a random number into there, though you'd need to find out and keep updating the maximum value for post ID (it's about 55000 right now).

For example, you could create a bookmark with the following for the location:

Code: Select all
javascript:window.location.href='http://hackaday.com/?p='+Math.ceil(Math.random()*55000);


And this bookmark will take you to a random post every time. In most browsers, you'll have to create a bookmark, and then edit the location manually to the above. Tested working in Firefox, Chrome, Internet Explorer.


I was not aware wordpress could do this. I do know though, that the new versions of firefox your method wont work. To use in-line code injection you need the web-console. There might be a config option in the about:config file to bypass that though.

And if we're going to use javascript with the way I suggested:
Code: Select all
javascript:window.location.href='http://hackaday.com/'+Math.floor(Math.random()*(2011-2004+1)+2004)+'/'+Math.floor(Math.random()*12+1)+'/'+Math.floor(Math.random()*31+1)


It wont return all the time because of the days in each month, but by the whois lookup on hackaday.com it was created 6/10/2004
I had more luck using my method, using ?p="random number" worked 4/10 times, and mine returned 8/10 times.
User avatar
Tech B.
 
Posts: 11
Joined: January 30th, 2011, 4:05 pm

Re: Hackaday.com Suggestion for Site

Postby UAirLtd » November 18th, 2011, 7:19 am

I was not aware wordpress could do this. I do know though, that the new versions of firefox your method wont work. To use in-line code injection you need the web-console. There might be a config option in the about:config file to bypass that though.


Code-injection prevents you from entering javascript directly into the URL bar. Manually creating a bookmark still works. I tested this on Firefox 8, Internet Explorer 9 and Chrome 15.
User avatar
UAirLtd
 
Posts: 629
Joined: July 19th, 2011, 10:32 pm

Re: Hackaday.com Suggestion for Site

Postby Neotelos » November 18th, 2011, 4:28 pm

I think the point of this is to add a site feature for those that are lazy and just want a button to click without toying around.

Honestly, I don't think the idea is half bad.
Would I use it? No
Do I know many people that would use a feature like that, whom are nearly afraid of scripting? Yes
Neotelos
 
Posts: 3
Joined: November 18th, 2011, 4:09 pm


Return to General Talk

Who is online

Users browsing this forum: Google [Bot] and 3 guests