Talk:Audio alarm: Difference between revisions

From Rosetta Code
Content added Content deleted
m (It probably just needs some rewriting.)
No edit summary
Line 8: Line 8:
: ''And'', let me reiterate your "app"'s design goal: you kindly send this "app" to some hapless schmuck who has never seen a file extension or an alarm clock, so that he can wake up in time; now every night before he goes to bed he needs to fire up an html file, calculate how many ''seconds'' he needs to sleep, type that in carefully, remember what ''filename'' it is and type ''that'' in carefully, then spend all night worrying if he typed anything wrong (you did no error check) or if the computer would itself go to sleep before dawn (Mr. Schmuck might not have your l33t mobile device)—I feel sorry for the poor soul. Then again, it's probably his own fault for making acquaintance with a "major geekage" who doesn't know to use javascript to calcuate time or file drag and drop. Meh. --[[User:Ledrug|Ledrug]] 23:10, 22 July 2011 (UTC)
: ''And'', let me reiterate your "app"'s design goal: you kindly send this "app" to some hapless schmuck who has never seen a file extension or an alarm clock, so that he can wake up in time; now every night before he goes to bed he needs to fire up an html file, calculate how many ''seconds'' he needs to sleep, type that in carefully, remember what ''filename'' it is and type ''that'' in carefully, then spend all night worrying if he typed anything wrong (you did no error check) or if the computer would itself go to sleep before dawn (Mr. Schmuck might not have your l33t mobile device)—I feel sorry for the poor soul. Then again, it's probably his own fault for making acquaintance with a "major geekage" who doesn't know to use javascript to calcuate time or file drag and drop. Meh. --[[User:Ledrug|Ledrug]] 23:10, 22 July 2011 (UTC)
::It probably just needs some rewriting. I think an analogue clock with an audible alarm (a variation on the "Draw a clock" task currently in draft), only it needs a full set of hands, a facility to set the alarm time, and a choice of audio file. This should not be a problem. I'm sure one of us can knock up a task description for that. [[User:Markhobley|Markhobley]] 23:31, 22 July 2011 (UTC)
::It probably just needs some rewriting. I think an analogue clock with an audible alarm (a variation on the "Draw a clock" task currently in draft), only it needs a full set of hands, a facility to set the alarm time, and a choice of audio file. This should not be a problem. I'm sure one of us can knock up a task description for that. [[User:Markhobley|Markhobley]] 23:31, 22 July 2011 (UTC)

What you were saying about "hapless schmuck", etc. was very funny. I'll tell all the other geeks what you said. But, I, being blind, make non-visual programs. With the HTML meta command and the "http-equiv" set to "refresh", the variable sets the content to a number of seconds, followed by ";url=" and then the filename, ".mp3". I've written all kinds of apps like this since 2007, and, with my knowledge of using MediaWiki editing (which I got from editing thousands of other wikis between late 2009 and now), that this is a programmer's wiki paradise. I can write apps, as long as they are original in the RC community. I guess mine ripped off of other ones or something. And what ridiculous person would say, "no more document.write for JavaScript"? That, and it's "writeln" counterpart, are the only way to actually produce HTML that's being manipulated by JavaScript. You know, I'm obsessed with client-side JavaScript. The JS definitive guide doesn't mention HTML "server tags" and server JS. What book would I need for that? Or, better yet, what RC page? [[User:Star651|Star651]] 23:52, 25 July 2011 (UTC)

Revision as of 23:52, 25 July 2011

Too specific

This is not a RC task, it's a job assignment a manager would hand out to programers. Also, what day and age is this, that someone still uses document.write? --Ledrug 02:58, 22 July 2011 (UTC)

Yeah we have a lot of these bits already: The user input, the pause, display a blank window, timers and event triggers (I think), play a recorded sound. We might need truncation of a string for the purpose of removing the file extension. (I haven't seen that anywhere). Also I don't think this is useful in alarm clock type applications, because you would typically want the event to be synchronous, with the clock itself, (typically, the alarm clock application would trigger the audio event, rather than a separate process.) Markhobley 09:39, 22 July 2011 (UTC)
I have stumbled across "document.write" a few times. I don't think that is a cause for concern. Markhobley 09:39, 22 July 2011 (UTC)

Hello, this is the original writer of AudioAlarm; the newbie RosettaCoder Star651. I was looking at your threads. I've been programming JavaScript since 2006, when I became this big HTMLer, and document.write and its evil partner document.writeln were always being used to display HTML content in JavaScript applications within HTML documents. In fact, the alarm clock I've woken up to the past few days was this app I wrote (major geekage). And, I'm positive it works. I'm sure non-programmers can use it. Some people (who are not programmers) can use it, for these non-programmers might not know about those file extensions. They might think that MP3 is a file type, but not necessarily know what an "extension" is. When I program it at 10:00 PM, for "28800" (28,800 seconds, which is 8 hours), and type in alarm name, such as "example" (which calls example.mp3), I keep this mobile device plugged in, which causes it to never shut off, until I tell it to. When the sound goes off, I know to get off, go over to my device, close the program, close the media-player, and off I go! HTML/JavaScript mania! I'll send the package to the people that I think may need it. So, as I reiterate, AudioAlarm.htm is a working program, when you load it in a Web-browser with active content on. (My browser has it on all the time). Star651 22:48, 22 July 2011 (UTC)

Oh I have no doubt you can make the program work, I was rather questioning the suitablity of the very specific requirements of your description: "type names without extension", "type seconds", "must be in its own folder"--what value do those provide as code examples here?
And, let me reiterate your "app"'s design goal: you kindly send this "app" to some hapless schmuck who has never seen a file extension or an alarm clock, so that he can wake up in time; now every night before he goes to bed he needs to fire up an html file, calculate how many seconds he needs to sleep, type that in carefully, remember what filename it is and type that in carefully, then spend all night worrying if he typed anything wrong (you did no error check) or if the computer would itself go to sleep before dawn (Mr. Schmuck might not have your l33t mobile device)—I feel sorry for the poor soul. Then again, it's probably his own fault for making acquaintance with a "major geekage" who doesn't know to use javascript to calcuate time or file drag and drop. Meh. --Ledrug 23:10, 22 July 2011 (UTC)
It probably just needs some rewriting. I think an analogue clock with an audible alarm (a variation on the "Draw a clock" task currently in draft), only it needs a full set of hands, a facility to set the alarm time, and a choice of audio file. This should not be a problem. I'm sure one of us can knock up a task description for that. Markhobley 23:31, 22 July 2011 (UTC)

What you were saying about "hapless schmuck", etc. was very funny. I'll tell all the other geeks what you said. But, I, being blind, make non-visual programs. With the HTML meta command and the "http-equiv" set to "refresh", the variable sets the content to a number of seconds, followed by ";url=" and then the filename, ".mp3". I've written all kinds of apps like this since 2007, and, with my knowledge of using MediaWiki editing (which I got from editing thousands of other wikis between late 2009 and now), that this is a programmer's wiki paradise. I can write apps, as long as they are original in the RC community. I guess mine ripped off of other ones or something. And what ridiculous person would say, "no more document.write for JavaScript"? That, and it's "writeln" counterpart, are the only way to actually produce HTML that's being manipulated by JavaScript. You know, I'm obsessed with client-side JavaScript. The JS definitive guide doesn't mention HTML "server tags" and server JS. What book would I need for that? Or, better yet, what RC page? Star651 23:52, 25 July 2011 (UTC)