#next week we start modular arithmetic
Explore tagged Tumblr posts
natural-blogarithm · 21 days ago
Text
talking about GCD and the euclidean algorithm with my high schoolers today :3
2 notes · View notes
this-week-in-rust · 3 years ago
Text
This Week in Rust 451
Hello and welcome to another issue of This Week in Rust! Rust is a programming language empowering everyone to build reliable and efficient software. This is a weekly summary of its progress and community. Want something mentioned? Tweet us at @ThisWeekInRust or send us a pull request. Want to get involved? We love contributions.
This Week in Rust is openly developed on GitHub. If you find any errors in this week's issue, please submit a PR.
Updates from Rust Community
Official
Announcing Rustup 1.25.0
Announcing Rustup 1.25.1
Changes in the Core Team
Newsletters
This Month in Rust OSDev: June 2022
This Month in Rust GameDev #35 - June 2022
Project/Tooling Updates
Tauri 1.0 Release
Lyon 1.0
rust-analyzer changelog #137
IntelliJ Rust Changelog #174
rustc_codegen_gcc: Progress Report #13
Accouncing Fornjot 0.7 (code-first CAD in Rust)
Announcing Experimental Rust Filesystem and Path Support for Xous PDDB!
This week in Fluvio #38: The programmable streaming platform
HexoSynth (modular synthesizer) - Devlog #4 - The Tracker Sequencer is Back
Slint UI crate weekly updates
Black Hat Rust updated for Rust 1.62 (and announcing the online course)
This week in Databend #50: A Modern Cloud Data Warehouse for Everyone
Observations/Thoughts
Announcement: Rust-Edu
A Pleasing Symmetry in Rust — Sympolymathesy, by Chris Krycho
Unsafe Syntax
Almost Rules
Pitfalls of fallible Iterators
Minimalist Guide to Poem
[audio] High Assurance Rust with Tiemoko Ballo
[ZH] [audio] 004. 与迟先生聊 Rust 与数据库系统
Rust Walkthroughs
Procedural macros under the hood: Part II | The IntelliJ Rust Blog
Bare-Metal Rust on ESP32: A Brief Overview
A Rust app in a Cloudflare Worker
Runtime errors: Come again? Rust macros to the rescue
Using the Kani Rust Verifier on a Firecracker Example
[video] How AWS is building the Rust SDK and how you can use it today - Zelda Hessler
[video] Constant fun (const fn) with Rust - Rainer Stropek
Research
Flux: Liquid Types for Rust
Miscellaneous
GCC Rust Approved By Steering Committee, Likely To Land For GCC 13
Crate of the Week
This week's crate is shame, a shader EDSL for writing render and compute pipelines in rust.
Thanks to Zicklag for the suggestion!
Please submit your suggestions and votes for next week!
Call for Participation
Always wanted to contribute to open-source projects but didn't know where to start? Every week we highlight some tasks from the Rust community for you to pick and get started!
Some of these tasks may also have mentors available, visit the task page for more information.
If you are a Rust project owner and are looking for contributors, please submit tasks here.
Updates from the Rust Project
363 pull requests were merged in the last week
implement support for DWARF version 5
sess: stabilize -Zterminal-width as --diagnostic-width
macros: LintDiagnostic derive
proc_macro: fix expand_expr expansion of bool literals
shorten def_span of closures to just their header
improve spans for specialization error
do not mention private types from other crates as impl candidates
adjust dangling-int-ptr error message
highlight conflicting param-env candidates
suggest #[derive(Default)] to enums with #[default]
suggest using block for extern "abi" fn with no body
suggest adding a derive for #[default] applied to variants
fix "wrap closure in parenthesis" suggestion for async closure
don't succeed evaluate_obligation query if new opaque types were registered
lints: mostly translatable diagnostics
deny float const params even when adt_const_params is enabled
allow arithmetic and certain bitwise ops on AtomicPtr
more need_type_info improvements
miri: handle Box with allocators
improve soundness of rustc_arena
fix ProjectionElem validation
compilation speed optimization for pest-2.1.3
use less string interning
more derive output improvements
implement SourceMap::is_span_accessible
use a bitset instead of a hash map in HIR ID validator
miscellaneous inlining improvements
partially stabilize const_slice_from_raw_parts
return a FxIndexSet in is_late_bound query
split TypeVisitable from TypeFoldable
implement ExitCodeExt for Windows
implement FusedIterator for std::net::(Into)Incoming
Windows: fallback for overlapped I/O
stabilize into_future
futures: add push_front and push_back to FuturesOrdered
regex: add ExactSizeIterator to SubCaptureMatches
cargo: fix corrupted git checkout recovery
cargo: fix publishing to crates.io with -Z sparse-registry
cargo: add a cache for discovered workspace roots
rustdoc: add more semantic information to impl IDs
rustdoc: filter '_ lifetimes from ty::Generics
clippy: allow let_unit_value in more cases
clippy: extend unnecessary_lazy_eval to cover bool::then -> bool::then_some
clippy: fix ICE in sugg::DerefDelegate with (named) closures
clippy: fix needless_borrow changing called trait impls on method receivers
clippy: fix undocumented_unsafe_blocks in closures
clippy: fix span for or_fun_call
clippy: ignore into_iter in significant_drop_in_scrutinee
clippy: lint shadow_* lints in anon const blocks
clippy: lint simple expressions in manual_filter_map, manual_find_map
clippy: maybe trait bound on type repetition
rust-analyzer: complete type param/associated type in trait generic arg per arg index
rust-analyzer: implement ignore and index metavar expression
rust-analyzer: extract Function misses locals used in closures
rust-analyzer: extract function from trait impl
rust-analyzer: improve suggested names for extracted variables
rust-analyzer: use SmallVec to slightly shrink ModPath size
Rust Compiler Performance Triage
A fairly noisy week (many entries below dropped and untagged as regressions), largely driven by tt-muncher and html5ever. Our sensitivity assessment currently takes roughly a week since new noise starts to learn the noise level, so it can take some time for oscillations to stop reporting somewhat spurious results.
Otherwise, this week had a number of solid improvements, and was overall positive, with improvements across many benchmarks.
Triage done by @simulacrum. Revision range: 880646c..b3f4c3
3 Regressions, 6 Improvements, 3 Mixed; 3 of them in rollups 53 artifact comparisons made in total
For details, see the full report.
Call for Testing
An important step for RFC implementation is for people to experiment with the implementation and give feedback, especially before stabilization. The following RFCs would benefit from user testing before moving forward:
No RFCs issued a call for testing this week.
If you are a feature implementer and would like your RFC to appear on the above list, add the new call-for-testing label to your RFC along with a comment providing testing instructions and/or guidance on which aspect(s) of the feature need testing.
Approved RFCs
Changes to Rust follow the Rust RFC (request for comments) process. These are the RFCs that were approved for implementation this week:
No RFCs were approved this week.
Final Comment Period
Every week, the team announces the 'final comment period' for RFCs and key PRs which are reaching a decision. Express your opinions now.
RFCs
No RFCs entered Final Comment Period this week.
Tracking Issues & PRs
[disposition: merge] Stabilize Windows FileTypeExt with is_symlink_dir and is_symlink_file
[disposition: merge?] Implement TryFrom<&OsStr> for &str
[disposition: merge] Tracking Issue for core::task::ready! macro
New and Updated RFCs
[new] RFC: resolve crates.io source replacement ambiguity
Upcoming Events
Rusty Events between 2022-07-13 - 2022-08-10 🦀
Virtual
2022-07-13 | Boulder, CO, US | Boulder Elixir and Rust
Monthly Meetup
2022-07-13 | Malaysia, MY | Rust Malaysia Meetup
Rust Malaysia Meetup
2022-07-14 | Nürnberg, DE | Rust Nurnberg DE
Rust Nürnberg online
2022-07-14 | San Diego, CA, US | San Diego Rust
San Diego Rust July 2022 Tele-Meetup
2022-07-16 | Vancouver, BC, CA | Vancouver Rust
Rust Study/Hack/Hang-out
2022-07-19 | Sydney, NSW, AU | Rust Australia
Rust Lightning Talks
2022-07-19 | Washington, DC, US | Rust DC
Mid-month Rustful
2022-07-20 | Cardiff, UK | Rust and C++ Cardiff
Rust Book Discussion - Building a Multithreaded Web Server
2022-07-21 | Stuttgart, DE | Rust Community Stuttgart
Rust-Meetup
2022-07-26 | Dallas, TX, US | Dallas Rust
Last Tuesday
2022-07-27 | Cardiff, UK | Rust and C++ Cardiff
Using Rust to read the Little Schemer
2022-07-29 | Minneapolis, MN, US | Minneapolis Rust Meetup
Beginner Rust Open "Office Hours"
2022-07-31 | Seattle, WA, US | Seattle Rust Meetup
Intro to Monads for Rustaceans
2022-08-02 | Buffalo, NY, US | Buffalo Rust Meetup
Buffalo Rust User Group, First Tuesdays
2022-08-03 | Indianapolis, IN, US | Indy Rust
Indy.rs - with Social Distancing
2022-08-03 | Stuttgart, DE | Rust Community Stuttgart
Rust-Meetup
Europe
2022-07-20 | Wrocław, PL | Rust Warsaw
Rust Warsaw #5
2022-07-21 | Wrocław, PL | Rust Wrocław
Rust Wrocław Meetup #27
2022-06-22 | Amsterdam, NL | Rust Developers Amsterdam Group
Rust Developers Amsterdam Group
North America
2022-07-13 | Atlanta, GA, US | Rust Atlanta
Grab a beer with fellow Rustaceans
2022-07-13 | Austin, TX, US | Rust ATX
Rust Lunch
2022-07-14 | Columbus, IL | Columbus Rust Society
Monthly Meeting
2022-07-19 | San Francisco, CA, US | San Francisco Rust Study Group
Rust Hacking in Person
2022-07-26 | Austin, TX, US | ATX Rustaceans
First Official Meetup - July 2022
2022-08-10 | Atlanta, GA, US | Rust Atlanta
Grab a beer with fellow Rustaceans
Oceania
2022-07-19 | Phillip, ACT, AU | Canberra Rust User Group
Canberra July Meetup
2022-07-28 | Brisbane, QLD, AU | Rust Brisbane
July Meetup
If you are running a Rust event please add it to the calendar to get it mentioned here. Please remember to add a link to the event too. Email the Rust Community Team for access.
Jobs
Please see the latest Who's Hiring thread on r/rust
Quote of the Week
Learning Rust has taught me something - "There are really no problems, just adventure and opportunities"
– Adeoye Adefemi on rust-users
Thanks to Adeoye Adefemi and Anton Fetisov for the suggestion as well as Christopher Durham for the leniency.
Please submit quotes and vote for next week!
This Week in Rust is edited by: nellshamrell, llogiq, cdmistman, ericseppanen, extrawurst, andrewpollack, U007D, kolharsam, joelmarcey, mariannegoldin.
Email list hosting is sponsored by The Rust Foundation
Discuss on r/rust
0 notes
cityinmars-blog · 6 years ago
Link
We ask hard questions because so many of the problems worth solving in life are hard. If they were easy, someone else would have solved them before you got to them. This is why college classes at top-tier universities have tests on which nearly no one clears 70%, much less gets a perfect score. They’re training future researchers, and the whole point of research is to find and answer questions that have never been solved. You can’t learn how to do that without fighting with problems you can’t solve. If you are consistently getting every problem in a class correct, you shouldn’t be too happy—it means you aren’t learning efficiently enough. You need to find a harder class.
The problem with not being challenged sufficiently goes well beyond not learning math (or whatever) as quickly as you can. I think a lot of what we do at AoPS is preparing students for challenges well outside mathematics. The same sort of strategies that go into solving very difficult math problems can be used to tackle a great many problems. I believe we’re teaching students how to think, how to approach difficult problems, and that math happens to be the best way to do so for many people.
The first step in dealing with difficult problems is to accept and understand their importance. Don’t duck them. They will teach you a lot more than a worksheet full of easy problems. Brilliant “Aha!” moments almost always spring from minds cultivated by long periods of frustration. But without that frustration, those brilliant ideas never arise.
Here are a few strategies for dealing with hard problems, and the frustration that comes with them:
Do something. Yeah, the problem is hard. Yeah, you have no idea what to do to solve it. At some point you have to stop staring and start trying stuff. Most of it won’t work. Accept that a lot of your effort will appear to have been wasted. But there’s a chance that one of your stabs will hit something, and even if it doesn’t, the effort may prepare your mind for the winning idea when the time comes. We started developing an elementary school curriculum months and months before we had the idea that became Beast Academy. Our lead curriculum developer wrote 100–200 pages of content, dreaming up lots of different styles and approaches we might use. Not a one of those pages will be in the final work, but they spurred a great many ideas for content we will use. Perhaps more importantly, it prepared us so that when we finally hit upon the Beast Academy idea, we were confident enough to pursue it.
Simplify the problem. Try smaller numbers and special cases. Remove restrictions. Or add restrictions. Set your sights a little lower, then raise them once you tackle the simpler problem.
Reflect on successes. You’ve solved lots of problems. Some of them were even hard problems! How did you do it? Start with problems that are similar to the one you face, but even think about others that have nothing to do with your current problem. Think about the strategies you used to solve those problems, and you might stumble on the solution. A few months ago, I was playing around with some Project Euler problems, and I came upon a problem that (eventually) boiled down to generating integer solutions to c² = a² + b² + ab in an efficient manner. Number theory is not my strength, but my path to the solution was to recall first the method for generating Pythagorean triples. Then, I thought about how to generate that method, and then the path to the solution became clear. (I’m guessing some of our more mathematically advanced readers have so internalized the solution process for this type of Diophantine equation that you don’t have to travel with Pythagoras to get there!)
Focus on what you haven’t used yet. Many problems (particularly geometry problems) have a lot of moving parts. Look back at the problem, and the discoveries you have made so far and ask yourself “What haven’t I used yet in any constructive way?” The answer to that question is often the key to your next step.
Work backwards. This is particularly useful when trying to discover proofs. Instead of starting from what you know and working towards what you want, start from what you want, and ask yourself what you need to get there.
Ask for help. This is hard for many outstanding students. You’re so used to getting everything right, to being the one everyone else asks, that it’s hard to admit you need help. When I first got to MOP my sophomore year, I was in way over my head. I understood very little of anything that happened in class. I asked for help from the professor once—it was very hard to get up the courage to do so. I didn’t understand anything he told me during the 15 minutes he worked privately with me. I just couldn’t admit it and ask for more help, so I stopped asking. I could have learned much, much more had I just been more willing to admit to people that I just didn’t understand. (This is part of why our classes now have a feature that allows students to ask questions anonymously.) Get over it. You will get stuck. You will need help. And if you ask for it, you’ll get much farther than if you don’t.
Start early. This doesn’t help much with timed tests, but with the longer-range assignments that are parts of college and of life, it’s essential. Don’t wait until the last minute—hard problems are hard enough without having to deal with time pressure. Moreover, complex ideas take a long time to understand fully. The people you know who seem wicked smart, and who seem to come up with ideas much faster than you possibly could, are often people who have simply thought about the issues for much longer than you have. I used this strategy throughout college to great success—in the first few weeks of each semester, I worked far ahead in all of my classes. Therefore, by the end of the semester, I had been thinking about the key ideas for a lot longer than most of my classmates, making the exams and such at the end of the course a lot easier.
Take a break. Get away from the problem for a bit. When you come back to it, you may find that you haven’t entirely gotten away from the problem at all—the background processes of your brain have continued plugging away, and you’ll find yourself a lot closer to the solution. Of course, it’s a lot easier to take a break if you start early.
Start over. Put all your earlier work aside, get a fresh sheet of paper, and try to start from scratch. Your other work will still be there if you want to draw from it later, and it may have prepared you to take advantage of insights you make in your second go-round.
Give up. You won’t solve them all. At some point, it’s time to cut your losses and move on. This is especially true when you’re in training, and trying to learn new things. A single difficult problem is usually going to teach you more in the first hour or two than it will in the next six, and there are a lot more problems to learn from. So, set yourself a time limit, and if you’re still hopelessly stuck at the end of it, then read the solutions and move on.
Be introspective. If you do give up and read the solution, then read it actively, not passively. As you read it, think about what clues in the problem could have led you to this solution. Think about what you did wrong in your investigation. If there are math facts in the solution that you don’t understand, then go investigate. I was completely befuddled the first time I saw a bunch of stuff about “mod”s in an olympiad solution—we didn’t have the internet then, so I couldn’t easily find out how straightforward modular arithmetic is! You have the internet now, so you have no excuse. If you did solve the problem, don’t just pat yourself on the back. Think about the key steps you made, and what the signs were to try them. Think about the blind alleys you explored en route to the solution, and how you could have avoided them. Those lessons will serve you well later.
Come back. If you gave up and looked at the solutions, then come back and try the problem again a few weeks later. If you don’t have any solutions to look at, keep the problem alive. Store it away on paper or in your mind. Richard Feynman once wrote that he would keep four or five problems active in the back of his mind. Whenever he heard a new strategy or technique, he would quickly run through his problems and see if he could use it to solve one of his problems. He credits this practice for some of the anecdotes that gave Feynman such a reputation for being a genius. It’s further evidence that being a genius is an awful lot about effort, preparation, and being comfortable with challenges.
1 note · View note
Text
The 'Planet's Smallest Property' Includes A Significant Price.
In 2014 Google.com announced a brand new app referred to as Spaces along with an easy target: streamline the way we discuss factors with people online. While absolutely nothing has actually been shared publicly just yet, a seeped slide off exactly what seems in internal discussion shows just what appears to be the approaching launch from a new Moto X, which would certainly sit above the mid-range G line while eschewing the modularity from the Zs. Alongside a newly-launched Moto C as well as reports from a rejuvenated Moto E, Motorola could possibly possess, by year's end, a room from similar-looking, uniformly-branded phones, providing each one for a specific market. If you are actually a photography enthusiast who loves to look into brand new ways from capturing snaps and video recordings coming from your smart device or even tablet, there are actually several modern technologies facilitating this. To click slow motion videos, there are actually a variety of functions that can easily switch your unit into a device for recording such clips. A: To possess a much better use Water Taxi: Real Boat Driving 3D Simulator, satisfy update your system software from samsung p600 as comply with: Settings - Regarding (Phone or even Tablet) - Device Updates - Examine Now - Restart & Install. Females grows older 19 as well as up must consume 2.7 liters from total water everyday, which has to do with 11.4 cups a time. Two years prior to Fate, back in 2012, our team possessed Planetside 2 It is actually an epic, full-blown first-person war therefore exceptional, you'll provide on your own a simple pinch every time you remember that's fully free of charge. It is actually dated, yet not as sluggish as several of Qualcomm's previous 2-series chipsets, which have actually gotten rid of the functionality from numerous Android units I've made use of before. Just expect a handful of moments and also possess Water Taxi: Genuine Watercraft Driving 3D Simulation install for huawei stone retried. Super Metroid was actually certainly never as big as Super Mario Planet or A Connect to the Past back then, however this's equally a lot of a 16-bit standard. Browse & Sprinkle some cool water waves on pool boating and also cylinders in among the most ideal practical 3d water slide activity. When a sluggish hookup is spotted, the provider revealed on the Chrome Blogging site that Data Saving idea setting will definitely soon remove most images on a page. Right now you may count on 3 ALL NEW DEGREES to be provided right into Where's My Water each week. There is actually a polycarbonate covering that also discusses the front end and also includes water insusceptible functionalities, however really isn't truly called for along with the Universe S8. All ports are also dealt with to prevent dust coming from entering all of them. Although that's not known how exposure to neonicotinoids could injure humans, clean water proponents mention the Iowa research is another indicator of the uncontrolled, understudied hazards that are probably existing in lots of Americans' water products. Not just because of the price from glueing safety rubber on the inside of the gadget, but in developing the item with water protection in mind. Simply examine the Applications icon in samsung t520 on the home screen, in which you will definitely discover the Water Taxi: Actual Watercraft Driving 3D Simulation and right now this is actually opportunity to have a great time. Yet even as our experts rear our (water) glasses to tribute this excellence, we should additionally raise once more decision to arms. Simply check out the Apps image in samsung j7 on the house display, where you will definitely discover the Water Taxi: Genuine Boat Driving 3D Simulation and right now this is actually opportunity to have a good time. Water and energy are sent through roadways, under which water pipes and cords are automatically risked. Consequently, right here our team have noted out a few of the slow mo camera applications for you to download and install as well as try them. Pupils in Shanghai that lately took worldwide tests for the very first time outscored each university body in the world In the exact same exam, American students positioned 25th in arithmetic, 17th in scientific research and also 14th in analysis. Authorities have torched a minimum of a thousand Sengwer homes considering that the Planet Financial institution started paying for the conservation venture, according to accounts by Sengwer and also civils rights scientists. That is actually assurance that is driving all over the world the upper hand and over a trail from rapid modification. Since melon includes an organic material called citrulline that is actually been actually tied to improved canal feature and also reduced blood pressure, that could be. The OnePlus 2 kind of splits the difference on our previous picks, picking a one-touch finger print sensing unit that can turn on as well as uncover the phone, but putting that here the display as Samsung does. Among those cuts is actually the planned removal from the United States Division from Horticulture's $498 million water and also wastewater funding and grant plan, which assists straining rural water electricals repair their commercial infrastructure units. As surge after wave from assault turn in and also the risks enhance, so the developing pleasure as well as intensity aid you fully submerse your own self in the cartoonish online planet. Scarcities, nuisances, as well as dry spells destabilize governments, and assets in water security will definitely stay away from or even mitigate those disasters. Gameplay is actually pretty easy: you must use your hands to scuff the filth coming from the midsts of the pipelines to allow the water - recreated with a realistic physics device - to pass off one end from the screen to the other. http://dezlantui-energie.info/ostelife-comentarii-pret-forum-crema-de-functionare-in-cazul-in-care-pentru-a-cumpara-in-farmacii/ : Water Taxi: True Boat Driving 3D Simulator assist much more than panasonic eluga. You'll discover that you barely have to contact the temperature because of the application, but this's simple sufficient to use and allows you adjust the temp or personally turn on the warm water or heating. So, even if you possess, state, 10GB complimentary on your hard drive, this could possibly become virtually full while editing a sizable video data, as well as this will definitely slow your work down. Basic, cost-effective actions like firewall programs and stronger passwords might yield enormous safety advantages for water structure. Or even, wait for a couple of mins and possess Water Taxi: Genuine Watercraft Driving 3D Simulation download for samsung t116nu retried and go through the install method. Pirates from the Caribbean is actually the absolute most well-known Disney experience became a film, yet our funds is on Tomorrowland for being the most fun. Our experts are getting into a world from electronic great quantity where we find implying in play and also value in one another. The edge between the two planets has come to be as well unclear, so, nobody might anticipate exactly what fact you end up at your next time surge. The most complicated will be actually to use that for things like bog vegetations and water lilies. A: To possess a much better use Water Taxi: True Boat Driving 3D Simulator, please upgrade your system software from lg illuminate as comply with: Settings - About (Phone or Tablet) - Unit Updates - Check out Now - Restart & Install. Possibly later on we'll be actually sparing for a burning commode instead of energy-saving wall structure protection as we look for to protect our precious supply of water. But the primary step to consuming alcohol extra water is to find out what does it cost? from this you need to begin with.
0 notes
grossjessica08 · 7 years ago
Text
Develop and Test a Small Procedural Java Program
Overview
This is an individual assignment that requires you to design, develop and test a small procedural Java program.
Timelines and Expectations Due: Refer to course description Learning Outcomes Assessed
The following course learning outcomes are assessed by completing this assessment:
Identify and use the correct syntax of a common programming language
Recall and use typical programming constructs to design and implement simple software solutions
Reproduce and adapt commonly used basic algorithms
Utilise pseudocode and/or algorithms as a major program design technique
Write and implement a solution algorithm using basic programming constructs
Demonstrate debugging and testing skills whilst writing code
Develop self-reliance and judgement in adapting algorithms to diverse contexts
Design and write program solutions to identified problems using accepted design constructs
Specifications
ITECH1000 Programming 1 – Summer 2017/18 Assessment Details
Your task is to design, develop and test a small application for Santa. Christmas is only weeks away and Santa has decided to open his own Christmas Parcel Delivery System. His first task is to develop a Christmas Parcel Delivery Calculator. The Calculator will allow his elves to setup a travel surcharge, enter parcels and display the end delivery costs.
Stage 1: Design
This stage requires you to prepare documentation that describes the function of the program and how it is to be tested. There is no coding or code testing involved in this stage. A document template has been provided for your use.
Requirements:
Read through Stage 2: Program Development to obtain details of the requirements of this program.
Write an algorithm that describes how the program will operate.
All program requirements – base, standard and advanced – must be included, even if you do not end up including all these requirements in your program code.
The algorithm must be structured logically so that the program would function correctly.
Prepare and document test cases that can be used to check that the program works correctly, once it has been coded. You do NOT need to run the test cases in this stage; this will occur in Stage 3: Testing.
All program requirements – base, standard and advanced, must be included, even if you do not end up including all these requirements in your program code.
Make sure the test cases include checking of data entered by the user to make sure that only valid data is accepted. If the user enters invalid data, the user should be informed of this and given another chance to enter the data. NB: As we have not covered exception handling, you may assume that the user will always enter an integer.
Test cases should be documented using a template like the one below. You may include extra information if you wish. At this stage, the Actual Result column will be left blank.
Stage 2: Program Development
Using the Design Documentation to assist you, develop a Java program that allows a user to set up transport (travel) costs, enter a parcels details and then calculates the total cost of sending the parcel. These requirements have been broken into three groups:
Base Functionality includes the minimal level of requirements to achieve the essential components of this assignment. This group of requirements focuses on getting the code to work and on using the programming constructs we cover in class. You can expect to use constants, variables, loops, conditional statements and arithmetic operators for these requirements and you should look for opportunities to use these wherever you can. You will not receive full marks for implementing a requirement (even if it works) if you have not used the appropriate programming construct to do so.
At this level, you can decide if it is easier for you to code everything within a single method, or to modularize it straight away.
Standard Functionality ensures the code is modularized, and that method calls are used to ensure the program flows correctly. It allows data to pass from one method to another as parameters.
Advanced Functionality provides a challenge task, and is best left until all the other requirements have been addressed. It requires looking at a Java API to find out how to use a class we have not covered in the course, and using this to calculate the delivery date.
You are expected to follow coding conventions, such as proper layout of code, use naming conventions and write meaningful comments throughout your program.
Base Functionality:
1)   Display a welcome message when the program starts
The welcome message should have a row of minus (-) and plus (+) signs at the top and the bottom, just long enough to extend over the text. Hint: Use a For loop for this.
The second line of the message should read “FEDERATION UNIVERSITY - ” and then your location e.g. Mt Helen, IIBIT Sydney, MIT Melbourne. This message should be approximately centred by printing white space first. Hint: Can you modify the For loop from the previous step to print the white spaces?
The third line of the message should be blank.
The fourth line should read “Christmas Parcel Delivery Calculator” and should be approximately centred.
The fifth line of the message should be blank
The sixth line should read “Developed by” followed by your name and a comma, then “ Student ID ”, then your student id, then finally “ for ITECH1000 Summer 2017”.
The seventh line should be blank.
The last line should be a repeat of minus (-) and plus (+) signs
Specifications
Provide a menu from which the user can select to setup travel costs, enter a parcel’s details, display the cost of delivering the parcel or exit the system. This menu should be repeated each time after the user has chosen and completed an option until the user chooses to Exit. The user selects an option by entering the number next to it. If an invalid number is selected, the user is advised and shown the menu again to make another selection.
Main Menu
Setup Cost Per KM
Enter Parcel
Display Parcel Delivery Costs
Exit System
When the user selects the Setup Cost Per KM option, prompt the user to enter the cost (per KM) to transport a package sent 100KM or less. The user should then be prompted to enter the cost (per KM) to transport a package sent over 100KM. After each prompt, the system reads and saves the value from the user before proceeding. When both values have been entered, send a message to the user informing them of what has been set and then show the menu.
Main Menu
Setup Cost Per KM
Enter Parcel
Display Parcel Delivery Costs
Exit System
Enter how much it costs per km for a package to be sent 100KM or less: $ 0.59
Enter how much it costs per km for a package to be sent over 100KM: $ 0.86
The cost for a parcel to be sent 100km or less is $0.59 per km. The cost for a parcel to be sent more than 100km is $0.86 per km
Main Menu
Setup Cost Per KM
Enter Parcel
Display Parcel Delivery Costs
Exit System
Note: the green text is the user-entered data and may change each time.
When the user selects Enter Parcel, prompt the user to enter the receivers name, the weight of the parcel, if they want insurance and how far the parcel is to be sent. Once the user has entered these values, save them for later access, send a message to the user informing them of what has been set and then redisplay the menu.
Main Menu
Setup Cost Per KM
Enter Parcel
Display Parcel Delivery Costs
Exit System
Enter receivers name: Greg
Do you want insurance (Y or N)? Y
How far do you want to send the parcel (km)? 512
You have entered the following details:
Receivers Name: Greg Parcel Weight: 100.0
Insurance: true
KM to be sent: 512
Main Menu
Setup Cost Per KM
Enter Parcel
Display Parcel Delivery Costs
Exit System
Specifications
When the user selects ‘Display Parcel Delivery Costs’, display a calculation of the transportation, insurance and total costs. This uses the data provided in Steps 1 and 2. The following rules will help calculate the total cost:
The amount of transport is calculated on the number of KM travelling required times the costs per km.
If the user has asked for insurance, this should be calculated by multiplying the weight of the parcel by 0.53
The total cost is the combination of the transport and insurance costs
The transportation, insurance and total costs should be displayed to 2 decimal places
After showing the calculations, the menu should be displayed
Main Menu
Setup Cost Per KM
Enter Parcel
Display Parcel Delivery Costs
Exit System
+++++ Calculating Costs ++++
Main Menu
Setup Cost Per KM
Enter Parcel
Display Parcel Delivery Costs
Exit System
When the user selects Exit System, quit the program with a message to the user. The message should be unique
Main Menu
Setup Cost Per KM
Enter Parcel
Display Parcel Delivery Costs
Exit System
Thank you for using this calculator!
Standard Functionality:
Modularize the code, correctly using method calls and passing data between methods as parameters.
Ensure the code complies with coding standards. This includes
Commenting the code so that it is clear what the code is doing and anything potentially unclear to future developers is explained. Hint: A well-documented algorithm/pseudocode/flowchart is an excellent starting point for this.
Replace any “magic numbers” with constants or variables, as appropriate. All values that have consistent values throughout the program should be stored as constants.
Indent the code and include white space as required to improve its readability.
Ensure all variables and constants have clear names that reflect their purpose
Comment the code
Specification Advanced Functionality:
Enhance the ‘Display Parcel Delivery Costs’ menu item so that it also displays when the parcel will arrive. The methods and attributes needed to complete this task are not explicitly taught in class. This task requires you to apply what you have learnt about reading the Java API to find a way to implement the functionality. The delivery date is calculated using the following rules
It takes 1 day to travel 10 KM
The current date/time should be used as the send date/time
The expected due date/time is displayed to the user
Main Menu
Setup Cost Per KM
Enter Parcel
Display Parcel Delivery Costs
Exit System
+++++ Calculating Costs +++++
Transportation Costs: 440.32
Insurance Costs: 53.0
Total Costs: 493.32
The parcel will arrive at: Fri Dec 22 09:46:39 AEDT 2017
Main Menu
Setup Cost Per KM
Enter Parcel
Display Parcel Delivery Costs
Exit System
Stage 3: Testing
Using a copy of the test cases developed in Stage 1: Design, test the program you have developed in
Stage 2: Program Development.   Document your results, including both failed and successful tests.
Note: Please do not leave out any failed tests. If your testing highlights that your program has not worked correctly, then the failed tests help to demonstrate that you have been testing your program properly.
To show that you have tested your program, include small (but readable) screen captures in your Actual Results as well as any explanatory comments. Microsoft Windows includes a Snipping Tool that is useful for taking captures of the relevant parts of the screen.
You may test your program in phases if you wish. Stage 2: Program Development provides three separate groups of functionality in the requirements, working from the minimal level of requirements through to more advanced concepts. Each of these groups can be tested individually.
Base Functionality:
This phase requires you to check that the base functions (displaying a welcome message when the program starts, showing a menu of options until the user chooses to exit, and Options 1, 2 and 3) have been implemented.
CRICOS Provider No. 00103D           Summer 2017-18 Assignment 1 Special
Standard Functionality:
This section does not include any functionality beyond that of the base functionality, however, if you needed to make changes to your code to implement modularization and coding standards, testing is required to ensure that the code still works properly once these changes have been made. Small changes made to code can quite often result in bugs so retesting is important to confirm the correct behaviour has been retained.
Advanced Functionality:
This phase requires testing the code that calculates and displays how long it will take for the parcel to arrive.
Submission
Your program code and testing documentation should be zipped into a single file and loaded into the Assignment Box provided in Moodle by the due date and time.
IMPORTANT NOTE: Make sure that you submit the source code (.java files) NOT the compiled program (.class files). Your work will NOT be marked if the .java files are not provided.
Feedback
Assignments will be marked within 2 weeks of submission. Marks will be made available by the lecturer
Plagiarism:
Plagiarism is the presentation of the expressed thought or work of another person as though it is one's own without adequately acknowledging that person. You must not allow other students to copy your work and must take care to safeguard against this happening. More information about the plagiarism policy and procedure for the university can be found at http://federation.edu.au/students/learning-and-study/online-help-with/plagiarism.
Order Now
0 notes
mthrynn · 8 years ago
Link
From June 5 through 9, Brookhaven Lab’s Computational Science Initiative hosted “Brookathon”
July 5, 2017 — On June 5, coding “sprinters”—teams of computational, theoretical, and domain scientists; software developers; and graduate and postdoctoral students—took their marks at the U.S. Department of Energy’s (DOE) Brookhaven National Laboratory, beginning the first of five days of nonstop programming from early morning until night. During this coding marathon, or “hackathon,” they learned how to program their scientific applications on devices for accelerated computing called graphics processing units (GPUs). Guiding them toward the finish line were GPU programming experts from national labs, universities, and technology companies who donated their time to serve as mentors. The goal by the end of the week was for the teams new to GPU programming to leave with their applications running on GPUs—or at least with the knowledge of how to do so—and for the teams who had come with their applications already accelerated on GPUs to leave with an optimized version.
The era of GPU-accelerated computing 
GPU-accelerated computing—the combined use of GPUs and central processing units (CPUs)—is increasingly being used as a way to run applications much faster. Computationally intensive portions of an application are offloaded from the CPU, which consists of a few cores optimized for serial processing (tasks execute one at a time in sequential order), to the GPU, which contains thousands of smaller, more efficient cores optimized for parallel processing (multiple tasks are processed simultaneously).
Nicholas D’Imperio, chair of Brookhaven Lab’s Computational Science Laboratory, holds a graphics processing unit (GPU) made by NVIDIA.
However, while GPUs potentially offer a very high memory bandwidth (rate at which data can be stored in and read from memory by a processor) and arithmetic performance for a wide range of applications, they are currently difficult to program. One of the challenges is that developers cannot simply take the existing code that runs on a CPU and have it automatically run on a GPU; they need to rewrite or adapt portions of the code. Another challenge is efficiently getting data onto the GPUs in the first place, as data transfer between the CPU and GPU can be quite slow. Though parallel programming standards such as OpenACC and GPU advances such as hardware and software for managing data transfer make these processes easier, GPU-accelerated computing is still a relatively new concept.
A hackathon with a history
Here’s where “Brookathon,” hosted by Brookhaven Lab’s Computational Science Initiative(CSI) and jointly organized with DOE’s Oak Ridge National Laboratory, Stony Brook University, and the University of Delaware, came in.
“The architecture of GPUs, which were originally designed to display graphics in video games, is quite different from that of CPUs,” said CSI computational scientist Meifeng Lin, who coordinated Brookathon with the help of an organizing committee and was a member of one of the teams participating in the event. “People are not used to programming GPUs as much as CPUs. The goal of hackathons like Brookathon is to lessen the learning curve, enabling the use of GPUs on next-generation high-performance-computing (HPC) systems for scientific applications.”
Brookathon is the latest in a series of GPU hackathons that first began in 2014 at Oak Ridge Leadership Computing Facility (OLCF)—a DOE Office of Science User Facility that is home to the nation’s most powerful science supercomputer, Titan, and other hybrid CPU-GPU systems. So far, OLCF’s Fernanda Foertter, a HPC user support specialist and programmer, has helped organize and host 10 hackathons across the United States and abroad, including Brookathon and one at the Jülich Supercomputing Centre in Germany earlier this year.
Members of the organizing committee explain the motivation behind Brookathon and the other hackathons in the series, and participants and mentors discuss their experiences.
“Hackathons are intense team-based training events,” said Foertter. “The hope is that the teams go home and continue to work on their codes.”
The idea to host at Brookhaven started in May 2016, when Lin and Brookhaven colleagues attended their first GPU hackathon, hosted at the University of Delaware. There, they worked on a code for lattice quantum chromodynamics (QCD) simulations, which help physicists understand the interactions between particles called quarks and gluons. But in using the OpenACC programming standard, they realized it did not sufficiently support the C++ programming language that their code library was written in. Around this time, Brookhaven became a member of OpenACC so that CSI scientists could help shape the standard to include the features needed to support their codes on GPUs. Through the University of Delaware hackathon and weekly calls with OpenACC members, Lin came into contact with Foertter and Sunita Chandrasekaran, an assistant professor of computer science at the University of Delaware who organized that hackathon, both of whom were on board with bringing a hackathon to Brookhaven.
“Brookhaven had just gotten a computing cluster with GPUs, so the timing was great,” said Lin. “In CSI’s Computational Science Laboratory, where I work, we get a lot of requests from scientists around Brookhaven to get their codes to run on GPUs. Hackathons provide the intense hands-on mentoring that helps to make this happen.”
Teams from near and far
A total of 22 applications were submitted for a spot at Brookathon, half of which came from Brookhaven Lab or nearby Stony Brook University teams. According to Lin, Brookathon received the highest number of applications of any of the hackathons to date. Ultimately, a review committee of OpenACC members accepted applications from 10 teams, each of which brought a different application to accelerate on GPUs:
Team AstroGPU from Stony Brook University: codes for simulating astrophysical fluid flows
Team Grid Makers from Brookhaven, Fermilab, Boston University, and the University of Utah (Lin’s team): a multigrid solver for linear equations and a general data-parallel library (called Grid), both related to application development for lattice QCD under DOE’s Exascale Computing Project
Team HackDpotato from Stony Brook University: a genetic algorithm for protein simulation
Team Lightning Speed OCT (for optical coherence tomography) from Lehigh University: a program for real-time image processing and three-dimensional image display of biological tissues
Team MUSIC (for MUScl for Ion Collision) from Brookhaven and Stony Brook University: a code for simulating the evolution of the quark-gluon plasma produced at Brookhaven’s Relativistic Heavy Ion Collider (RHIC)—a DOE Office of Science User Facility
Team NEK/CEED from DOE’s Argonne National Laboratory, the University of Minnesota, and the University of Illinois Urbana-Champaign: fluid dynamics and electromagnetic codes (Nek5000 and NekCEM, respectively) for modeling small modular reactors (SMR) and graphene-based surface materials—related to two DOE Exascale Computing Projects, Center for Efficient Exascale Discretizations (CEED) and ExaSMR
Team Stars from the STAR from Brookhaven, Central China Normal University, and Shanghai Institute of Applied Physics: an online cluster-finding algorithm for the energy-deposition clusters measured at Brookhaven’s Solenoidal Tracker at RHIC (STAR) detector, which searches for signatures of the quark-gluon plasma
Team The Fastest Trigger of the East from the UK’s Rutherford Appleton Laboratory, Lancaster University, and Queen Mary University of London: software that reads out data in real time from 40,000 photosensors that collect light generated by neutrino particles, discards the useless majority of the data, and sends the useful bits to be written to disk for future analysis; the software will be used in a particle physics experiment in Japan (Hyper-Kamiokande)
Team UD-AccSequencer from the University of Delaware: a code for an existing next-generation-sequencing tool for aligning thousands of DNA sequences (BarraCUDA)
Team Uduh from the University of Delaware and the University of Houston: a code for molecular dynamics simulations, which scientists use to study the interactions between molecules
“The domain scientists—not necessarily computer science programmers—who come together for five days to migrate their scientific codes to GPUs are very excited to be here,” said Chandrasekaran. “From running into compiler and runtime errors during programming and reaching out to compiler developers for help to participating in daily scrum sessions to provide progress updates, the teams really have a hands-on experience in which they can accomplish a lot in a short amount of time.”
Read the full story at: http://ift.tt/2tR9Sni
Source: BNL
The post Brookhaven Lab Hosts Five-Day GPU Hackathon appeared first on HPCwire.
via Government – HPCwire
0 notes