Search Results

Search found 5 results on 1 pages for 'alexw h b'.

Page 1/1 | 1 

  • Imperative vs. component based programming [closed]

    - by AlexW
    I've been thinking about how programming and more specifically the teaching of programming is advocated amongst the community (online). Often I've heard that Ruby and RoR is an ideal platform for learning to program. I completely disagree... RoR and Ruby are based on the application of the component based paradigm, which means they are ideal for rapid application development. This is much like the MVC model in PHP and ASP.NET But, learning a proper imperative language like Java or C/C++ (or even Perl and PHP) is the only way for a new programmer to explore logic itself, and not get too bogged down in architectural concerns like the need for separation of concerns, and the preference for components. Maybe it's a personal preference thing. I rather think that the most interesting aspects to programming are the procedural bits of code I write that actually do stuff rather than the project planning, and modelling that comes about from fully object oriented engineering or simply using the MVC model. I know this may sound confused to some of you. I feel strongly though that the best way for programming to be taught is through imperative and procedural methods. Architectural (component) methods come later, if at all. After all, none of the amazing algorithms that exist were based on OOP practice! It's all procedural code when it comes to the 'magic'. OOP is useful in creating products and utilities. Algorithms are what makes things happen, and move data around, and so imperative (and/or procedural) code are what matters most. When I see programmers recommending Ruby on Rails to newbie developers, I think it's just so wrong. Just because you write less code with Ruby does not make it easier to do! It's the opposite... you have to know loads more to appreciate its succinct nature. New coders who really want to understand the nuts and bolts of coding need to go away and figure out writing methods/functions (i.e. imperative programming) and working in procedural style, in order to grasp the fundamentals, first, before looking into architectural ways of working. So, my question is: should Ruby ever be recommended as a first language? I think no (obviously)... what arguments are there for it?

    Read the article

  • Share a USB sound card over a network/bluetooth (Mac & PC)

    - by AlexW
    I've been wondering how I can stream audio to an external Edirol USB sound card, wirelessly, on both Mac and PC. I'm not looking for high quality transmission, just to play mp3s from my Mac laptop to a USB sound card that is attached to two very nice balanced studio reference monitors. Is there any way I can firstly power the sound card box, and secondly, provide with an audio stream along it's USB input. I've looked at the Belkin USB hub, and I have a Time Capsule with the AirPort interface inside. These things seem to do vaguely what I want but when it comes to audio, the specifications are less clear. Any suggestions very welcome.

    Read the article

  • ping incorrectly pinging 127.0.0.1

    - by AlexW
    I've got an odd DNS issue. I'm running a dual ipv4/ipv6 environment on Linux. Pinging some sites results in ping pinging 127.0.0.1. e.g. #> ping authserver.mojang.com PING authserver.mojang.com (127.0.0.1) 56(84) bytes of data. 64 bytes from localhost.localdomain (127.0.0.1): icmp_seq=1 ttl=64 time=0.045 ms 64 bytes from localhost.localdomain (127.0.0.1): icmp_seq=2 ttl=64 time=0.043 ms 64 bytes from localhost.localdomain (127.0.0.1): icmp_seq=3 ttl=64 time=0.058 ms --- authserver.mojang.com ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2000ms rtt min/avg/max/mdev = 0.043/0.048/0.058/0.010 ms Dig, however correctly returns the following: # dig authserver.mojang.com ; <<>> DiG 9.9.3-P2 <<>> authserver.mojang.com ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 15800 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1 ;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 512 ;; QUESTION SECTION: ;authserver.mojang.com. IN A ;; ANSWER SECTION: authserver.mojang.com. 5 IN A 54.235.119.47 ;; Query time: 14 msec ;; SERVER: 2001:4860:4860::8888#53(2001:4860:4860::8888) ;; WHEN: Sat Nov 09 15:34:40 GMT 2013 ;; MSG SIZE rcvd: 66 I'm confused! My web browser returns the correct website, and the same computer booted into Windows also works correctly.

    Read the article

  • How does a GUI Framework work?

    - by AlexW.H.B.
    I have been all over the web looking for an answer to this, and my question is this: How does a GUI framework work? for instance how does Qt work, is there any books or wibsites on the topic of writing a GUI framework from scratch? and also does the framework have to call methods from the operating systems GUI framework? -- Thank you to any one who takes the time to try to answer this question, and forgive me if i misspelled anything.

    Read the article

  • Invalid controller using custom routes

    - by AlexW
    I've been following the instruction on how to create custom routes from the book Zend Framework - A Beginners Guide I've changed my application.ini file to include this routing information: resources.router.routes.static-content.route = /content/:page resources.router.routes.static-content.defaults.module = default resources.router.routes.static-content.defaults.controller = static-content resources.router.routes.static-content.defaults.view = static-content resources.router.routes.static-content.defaults.action = display Given the above configuration, I have this controller: <?php class Default_StaticContentController extends Zend_Controller_Action { public function init() { /* Initialize action controller here */ } public function displayAction() { // action body $page = $this->getRequest()->getParam('page'); if (file_exists($this->view->getScriptPath(null) . '/' . $this->getRequest()->getControllerName() . '/' . $page . $this->viewSuffix )) { $this->render($page); } else { throw new Zend_Controller_Action_Exception('HLC - Page not found', 404); } } } I have a view named about.phtml in the APPLICATION_PATH/modules/default/views/static-content folder. What ahppens is I get an error saying: An error occurred Page not found Exception information: Message: Invalid controller class ("StaticContentController") Stack trace: #0 /Applications/MAMP/htdocs/zend/library/Zend/Controller/Dispatcher/Standard.php(262): Zend_Controller_Dispatcher_Standard->loadClass('StaticContentCo...') #1 /Applications/MAMP/htdocs/zend/library/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http)) #2 /Applications/MAMP/htdocs/zend/library/Zend/Application/Bootstrap/Bootstrap.php(97): Zend_Controller_Front->dispatch() #3 /Applications/MAMP/htdocs/zend/library/Zend/Application.php(366): Zend_Application_Bootstrap_Bootstrap->run() #4 /Applications/MAMP/htdocs/HLC/public/index.php(26): Zend_Application->run() #5 {main} Request Parameters: array ( 'page' => 'about', 'module' => 'default', 'controller' => 'static-content', 'view' => 'static-content', 'action' => 'display', ) Note that it is not rendering my customised Zend_Controller_Action_Exception but throwing the global error. I'm using the URL: http://hlc.local:8888/content/about The default index action works ok, just this routing that's not working.

    Read the article

1