[Duncan's Home] Duncan's Jotter
faq -  feedback -  home 
Members
Logon   -   Sign Up
smeed >> duncan.smeed.org | Duncan's Jotter
duncan.smeed.org | Duncan's Jotter

Day Link Icon 1/20/2001

A wee C problem to ponder

(by Duncan, @ 12:55 AM)

I posted the following problem for my exam-exempted students to ponder whilst those less fortunate than themselves were sitting the LLP exam yesterday afternoon. [Caveat: no warnings were reported by the particular compiler that was being used at the time this problem was first set for an exam - 1994. I believe the current Borland compiler issues three warnings but it's perfectly valid C and has no syntax errors - only semantic one(s) so the code should compile and run as is. But don't cheat and use the compiler to (help) work out the answer. Feel free to post answers here. FYI, hardly anyone that attempted this problem in the extra coursework came even close to answering this part of the question correctly. And they could have used a compiler to help them!!]

4 (a) The following C source text has been compiled without any errors or warnings being reported:

#include <stdio.h>

main() { unsigned char c; int j,n; for (c=getchar(),j=0,n='\n'; c!=EOF; (j%5==0)?putchar(n),putchar(c):\ putchar(c),c=getchar(),j++) exit (0); }

Nevertheless, due to some simple coding errors, the program does not split the input lines on every fifth character as intended. Answer the following questions:

  1. What does the program, as given, actually do?
  2. What mistakes have been made by the programmer that prevent it working as intended?
(5 marks)

(b) As well as being in error, this program is badly written and violates good programming practice. Rewrite it to make it as readable and as understandable as possible, eliminating the original mistakes in the process.

(5 marks)

Comments: 0 | Reply | Categories: None

Joel on Software

(by Duncan, @ 4:15 PM)

I was interested to read that Joel plumped for the same ORINOCO PC Card that I enthused about a month or so ago. Of course, the real reason to be visiting Joel's page was to read who had the worst web programmers in the world. A salutory lesson for all aspiring web programmers.

Comments: 0 | Reply | Categories: None



Day Link Icon 1/19/2001

WebWise - Guides - Publishing your pages by Giles Turnbull

(by Duncan, @ 12:40 AM)

The BBC's WebWise - Guides - Publishing your pages by Giles Turnbull
Why bother with HTML coding when some websites can do it for you? WebWise's Guide to making a stress-free webpage.

[snip]

The three services we shall examine are EditThisPage (http://www.editthispage.com), Free Conversant (http://www.free-conversant.com), and WikiWeb (http://www.wikiweb.com).

Guess which came out as the most powerful of the three ;-)?:

FREE CONVERSANT

There's no doubt that Conversant is one of the most powerful systems available for managing a website, but it is complex and not recommended for absolute beginners - even an accomplished internet user should devote some time to learning the ins and outs of the system, but with that done, they will have the chance to build a very impressive website.

We've created a Conversant site here for you to have a look at: http://www.free-conversant.com/bbcwebwise/

Comments: 0 | Reply | Categories: None

Google's University Search

(by Duncan, @ 10:23 AM)

via David [SiT] Carter-Tod - Google's University Search:
Google offers free SiteSearch (enables users to search your university website) and optional WebSearch (enables users to search the Internet) to universities and educational organizations worldwide.

UC Berkeley is one of the early adopters and as one of my heroes - David Patterson - is a Professor at UCB an obvious thing to try was: UC Berkeley - Google Search Results

Searched pages from berkeley.edu for Computer Architecture. Results 1 - 10 of about 5,260. Search took 0.11 seconds.

Prof Patterson is teaching the Spring 2001 CS 252 - Graduate Computer Architecture class. One of the reason's I really like Prof Patterson's whole approach to teaching is summed up on that page and, in particular, ;-):

Lecture notes will be available in pdf and powerpoint formats, with 6 per page for pdf for conventinent (sic) printing.. (Powerpoint is for instructors who want to give lectures themselves based on CS 252. Note that I still use a Macintosh, so they were created in Office 98 Powerpoint--98, not 97--, in case that helps Microserfs.)

It's been a while since I migrated a version -- [52.225] CAD... -- of my final year honours class Computer Architecture and Design II into the second year of the CS degree at Strathclyde. CAD II was based on the excellent Patterson and Hennessy textbook - Computer Architecture: A Quantitative Approach which I see is in Beta draft, 3rd edition. Must try and get hold of a copy. I still have a copy of the hardback First Edition of the book autographed by David Patterson and John Hennessy when I went to visit them in California eight or nine years ago.

Comments: 0 | Reply | Categories: None

AltaVista threatens rivals with patent portfolio

(by Duncan, @ 11:54 AM)

The Register
...the chairman and CEO of AltaVista's parent company, CMGI, David Wetherell ... said the company would be pursuing its search engine patents and we can expect lawsuits coming this quarter.

Of course, the intended coup of the Internet search engine market comes in the form of some lovely management speak: "Even though AltaVista's doing well in the advertising space, we just think that in order to really ensure strong growth they ought to leverage their position in search licensing to a greater extent." ... "We believe that virtually everyone out there who indexes the Web is in violation of at least several of those key patents."

This certainly threatens to eclipse the furore that surrounded Amazon's 'abuse' of patents! Better start looking for prior art...

Comments: 0 | Reply | Categories: None

IBM and NCSA Create World's Fastest Linux Supercomputers in Academia

(by Duncan, @ 4:36 PM)

IBM and NCSA Create World's Fastest Linux Supercomputers in Academia
Armonk, NY, January 16, 2001 -- IBM and The National Center for Supercomputing Applications (NCSA) at University of Illinois at Urbana-Champaign today announced that NCSA will install two IBM Linux clusters, creating the world's fastest Linux supercomputer in academia. NCSA's clusters will have two teraflops of computing power and will be used by researchers to study some of the most fundamental questions of science, such as the nature of gravitational waves first predicted by Albert Einstein in his Theory of Relativity.

Comments: 0 | Reply | Categories: None



Day Link Icon 1/18/2001

The Fragile Base Class (FBC) Problem

(by Duncan, @ 12:00 AM)

Jim [hbwt] highlights the Fragile Base Class problem that can beset O-O systems such as BeOS.Be Newsletter, Issue 79
BE ENGINEERING INSIGHTS: What's the Fragile Base Class (FBC) Problem?

Try as we might to separate and hide our implementation of the BeOS, certain dependencies are created the moment a developer compiles and links against our dynamically loaded libraries.

Note to my students: the FBC Problem will not appear in the 52.223 Low Level Programming exam on Friday ;-)

Comments: 0 | Reply | Categories: None

Accessibility of the Internet in Higher Education:

(by Duncan, @ 2:36 PM)

Accessibility of the Internet in Higher Education:
In this White Paper I will provide a brief description of the need for the Web in the education of ALL students and will describe what is happening as postsecondary entities participate in our society's online explosion. Through multiple data sources, I try to capture a national snapshot of postsecondary accessibility today for students with disabilities. Finally, I offer a model to explain the enormous challenges faced in education and potential directions that could help mitigate this endemic problem.

Comments: 0 | Reply | Categories: None

Copyright © 1999-2005, Duncan Smeed. All rights reserved.
 
January, 2001
Sun Mon Tue Wed Thu Fri Sat
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31  
Dec  Feb
Tell ICANN to keep their hands off .org!


Run the HTML validator for this page
Webmaster: web at smeed.org