One's Vs Zero's
Event Description:
We have seen many interesting competitions between cars, bots etc but we never came across a competition between minions so here in ANUBHAVA'14 we will have a war between yellow minions and the mutated minions (purple). Consider yellow minions as ones and mutated minions as zeroes, the task here is simple, find out which minion has the upper hand over the other minions based on the knowledge on digital electronics.
Round 1:
This round consists of multiple choice questions. The participants are tested on their knowledge of basics in digital electronics .This is a complete paper and pen round.
Round 2:
This round consists of questions purely based on Digital electronics in which the answers will be completely binary (1's & 0's). The participants are required to find out who wins based on the result. This is also a complete paper and pen round.
Round 3:
Participants are required to design and implement a circuit based on the problem statement given by the organizers .This should be done on spot and time plays a crucial role.
Rules:
1) The Decision of the organizers regarding the scoring will be final and transparency will be maintained.
2) The Event is completely On the Spot event.
3) Prior knowledge of basic digital electronics and circuit components is also required.
4) This is a Team Event.
5) The team can comprise a minimum and maximum of 2 members.
6) The team can comprise members from different departments.
7) Elimination will be there after every round.
Contacts:
Lakshman revella<PHONE_NUMBER>
Sai ram<PHONE_NUMBER>
Vivek<PHONE_NUMBER>
Noorjahan<PHONE_NUMBER>


MANGO PEOPLE T-SHIRT
Price: $300
Color: Red
Price: XL
Quantity:
MANGO PEOPLE T-SHIRT
Price: $300
Color: Red
Price: XL
Quantity:
SUB TOTAL $900
GRAND TOTAL $900
Price: $300
Color: Red
Price: XL
Price: $300
Color: Red
Price: XL


Each seneca store has a set of utility functions. One of them is list$
, which is used to query for a very specific selection of data.
Note: An awesome npm module lodash is used in examples here for neat display of results (_
variable).
For the purpose of this example, a small set of manual entries needs to be created(so that we have something to select from). This can be easily achieved using chaining. Note only one callback is needed - at the very end. Each make$()
is needed to make sure instances are unique.
As with people, there may be many with the same name living in different locations.
var person = seneca.make$('person')
person
.make$().save$({name:'John', surname:'Smith', city:'Dublin', address:'Street 4'})
.make$().save$({name:'John', surname:'Smith', city:'Dublin', address:'Street 5'})
.make$().save$({name:'John', surname:'Smith', city:'Dublin', address:'Street 6'})
.make$().save$({name:'John', surname:'Smith', city:'Dublin', address:'Street 1'})
.make$().save$({name:'John', surname:'Smith', city:'Dublin', address:'Street 2'})
.make$().save$({name:'John', surname:'Smith', city:'Dublin', address:'Street 3'})
.make$().save$({name:'William', surname:'Smith', city:'Dublin', address:'Street 7'})
.make$().save$({name:'William', surname:'Smith', city:'Dublin', address:'Street 8'})
.make$().save$({name:'William', surname:'McDonald', city:'Dublin', address:'Street 9'},
function (err, res) {
if (err) console.error(err)
// all entities saved
})
Once we have our entities in our store, we can proceed to retrieving the data.
In order to get all entries from the store, we make query object empty.
person.list$({}, function (err, res) {
if (err) console.error(err)
_.each(res, function (entry) {
console.log(entry)
})
})
We can also remove the empty object altogether.
person.list$(function (err, res) {
if (err) console.error(err)
_.each(res, function (entry) {
console.log(entry)
})
})
Result:
$-/-/person;id=udl5h4;{name:John,surname:Smith,city:Dublin,address:Street 4}
$-/-/person;id=h0wxn8;{name:John,surname:Smith,city:Dublin,address:Street 5}
$-/-/person;id=szu6kd;{name:John,surname:Smith,city:Dublin,address:Street 6}
$-/-/person;id=wq0rz0;{name:John,surname:Smith,city:Dublin,address:Street 1}
$-/-/person;id=zl88s0;{name:John,surname:Smith,city:Dublin,address:Street 2}
$-/-/person;id=avzobw;{name:John,surname:Smith,city:Dublin,address:Street 3}
$-/-/person;id=ltdgwy;{name:William,surname:Smith,city:Dublin,address:Street 7}
$-/-/person;id=t4dmll;{name:William,surname:Smith,city:Dublin,address:Street 8}
$-/-/person;id=b2rodt;{name:William,surname:McDonald,city:Dublin,address:Street 9}
In order to select a subset of entries, we add matching field to the query object.
list$({name:'William'}, function (err, res) {
if (err) console.error(err)
_.each(res, function (entry) {
console.log(entry)
})
})
Result:
$-/-/person;id=fvs3p6;{name:William,surname:Smith,city:Dublin,address:Street 7}
$-/-/person;id=lpdl0e;{name:William,surname:Smith,city:Dublin,address:Street 8}
$-/-/person;id=s8mh28;{name:William,surname:McDonald,city:Dublin,address:Street 9}
In order to select a subset of entries, which comply with many constraints, we just simply add more matching fields to the query object.
list$({name:'William', surname:'McDonald'}, function (err, res) {
if (err) console.error(err)
_.each(res, function (entry) {
console.log(entry)
})
})
Result:
$-/-/person;id=r5g9fx;{name:William,surname:McDonald,city:Dublin,address:Street 9}
In order to sort in ascending or descending order, we add a sort$
field containing an object containing a field name and sort direction.
Ascending
list$({sort$:{address:1}}, function (err, res) {
if (err) console.error(err)
_.each(res, function (entry) {
console.log(entry)
})
})
Result:
$-/-/person;id=wq0rz0;{name:John,surname:Smith,city:Dublin,address:Street 1}
$-/-/person;id=zl88s0;{name:John,surname:Smith,city:Dublin,address:Street 2}
$-/-/person;id=avzobw;{name:John,surname:Smith,city:Dublin,address:Street 3}
$-/-/person;id=udl5h4;{name:John,surname:Smith,city:Dublin,address:Street 4}
$-/-/person;id=h0wxn8;{name:John,surname:Smith,city:Dublin,address:Street 5}
$-/-/person;id=szu6kd;{name:John,surname:Smith,city:Dublin,address:Street 6}
$-/-/person;id=ltdgwy;{name:William,surname:Smith,city:Dublin,address:Street 7}
$-/-/person;id=t4dmll;{name:William,surname:Smith,city:Dublin,address:Street 8}
$-/-/person;id=b2rodt;{name:William,surname:McDonald,city:Dublin,address:Street 9}
Descending
list$({sort$:{address:-1}}, function (err, res) {
if (err) console.error(err)
_.each(res, function (entry) {
console.log(entry)
})
})
Result:
$-/-/person;id=sfbvsw;{name:William,surname:McDonald,city:Dublin,address:Street 9}
$-/-/person;id=0611oy;{name:William,surname:Smith,city:Dublin,address:Street 8}
$-/-/person;id=l843pa;{name:William,surname:Smith,city:Dublin,address:Street 7}
$-/-/person;id=fmsp67;{name:John,surname:Smith,city:Dublin,address:Street 6}
$-/-/person;id=8xfr93;{name:John,surname:Smith,city:Dublin,address:Street 5}
$-/-/person;id=ynnvj8;{name:John,surname:Smith,city:Dublin,address:Street 4}
$-/-/person;id=iakb54;{name:John,surname:Smith,city:Dublin,address:Street 3}
$-/-/person;id=avlabl;{name:John,surname:Smith,city:Dublin,address:Street 2}
$-/-/person;id=as6k3n;{name:John,surname:Smith,city:Dublin,address:Street 1}
We can limit the amount of results by adding the limit$
field to the query. It has a numerical value.
list$({limit$:4}, function (err, res) {
if (err) console.error(err)
_.each(res, function (entry) {
console.log(entry)
})
})
Result:
$-/-/person;id=u0ekqm;{name:John,surname:Smith,city:Dublin,address:Street 4}
$-/-/person;id=j3cm0w;{name:John,surname:Smith,city:Dublin,address:Street 5}
$-/-/person;id=2f9e24;{name:John,surname:Smith,city:Dublin,address:Street 6}
$-/-/person;id=4opp4t;{name:John,surname:Smith,city:Dublin,address:Street 1}
A number of $ fields can be inserted into the query object to achieve desired output. For example, we could decide to sort in ascending order and limit results to first three.
list$({sort$:{address:1}, limit$:3}, function (err, res) {
if (err) console.error(err)
_.each(res, function (entry) {
console.log(entry)
})
})
Result:
$-/-/person;id=big0da;{name:John,surname:Smith,city:Dublin,address:Street 1}
$-/-/person;id=khg1i1;{name:John,surname:Smith,city:Dublin,address:Street 2}
$-/-/person;id=979zgb;{name:John,surname:Smith,city:Dublin,address:Street 3}
Issues? From spelling errors to broken tutorials and everything in between, report them here.


Details
Name
Short Name
Description
Items
Currency
Decimal Places
Multiple of
Minimum Deposit Amount
Default Deposit Amount
Maximum Deposit Amount
Interest Compounding Period
Interest Posting Period
Interest Calculated Using
Days In Year
Settings
Lock-in Period
Minimum Deposit Term
Deposit Term In multiple of
Maximum Deposit Term
Apply penal interest (less)
Withhold tax applicable
Tax Group
Interest Rate Chart
Valid From Date
End Date
Charges
Accounting :
Saving Reference (Assets)
Saving Control (Liabilities)
Savings Transfers In Suspense (Liabilities)
Interest On Savings (Expenses)
Income From Fees (Income)
Income From Penalties (Income)
Advanced Accounting Rule
Configure Fund Sources for Payment Channels
Map Fees to Income Accounts
Map Penalties to Specific Income Accounts


Open Source Licence
The source code to Nimbits Server, SDK, Core Framework, this web site, and
Android App are all distributed under the GNU 3 General Public Licence.
We believe in open and social code and un-restrictive software.
Please feed free to contact us if you require a distribution on Nimbits Server under a different licence agreement.
Nimbits also used several open source components including:
Nimbits on GitHub »
Using the Nimbits code means complying with the licence as well as the licences in these projects
respectively.
The code follows a very robust and expandable architecture
- nimbits-model contains all of the base model objects and interfaces such as Value, Point, Category etc. The models
are Serializable Data transfer objects.
- nimbits-sdk compiles as a runnable JAR and inherits nimbits-model. It contains many helper functions that access the
REST APIs hosted on a nimbits-tds. One might use the SDK to call GetCurrentValue() in the SDK to get a Point's current Value;
objects defined in nimbits-model. If one was to just call the
/service/currentvalue REST service directly on nimbits server you
would get the JSON data of a Value Object. The SDK simply helps authenticate and de-serialize the object for you.
- nimbits-tds
is the nimbits server which contains the com.nimbits.client namespace which is the UI and Async interfaces
to the web services and com.nimbits.server which houses the ORM, DAO, Servlets, REST APU and so on.


Raspberry Pi!!!
Things:
MotoCam
Camera Controls
RaspiSnap!
MultiSnapshot!
Show Snapshot Directory
Location Tracking
Location Tracker
Show Location Logs
Tracker Paths
CGI Scripts
Show current directory
Show web root directory
Show bin directory
ifConfig
Show web log (short)
Show web log (1000)
Show OliWeb config
Show all running processes
Show all system users
Show capture directory
Show motion directory
Show Music Files
Ukelele
CGI Scripts
Wifi Restart Log
GPIO
Flip pin 17
Flip pin 22
Flip pin 23
Pin States
BlinkTest!
Bird Chatter
Long Chatter
Short Chatter
GPIO Controls
Miscellaneous
Teensy Serial
ABAP!!!
Testing
Input tester
Form Input Tester
Test PHP execution
Test CGI
Test 404 FNF
Raspberry Pi hosting
OliWeb 1.0.0
[Powered by IvySox 1.0.0]


CGIskak
Choose moves by clicking from/to square with the mouse...
${8-y}
$c
New Game
Change side
$status
Preferences
-
Review game
-
Recent Games


Before Change
G_train, batch_size, num_samples, name="train"
).flow(edge_ids_train, edge_labels_train, shuffle=True)
test_gen = GraphSAGELinkGenerator(
G_test, batch_size, num_samples, name="test"
).flow(edge_ids_test, edge_labels_test)
// GraphSAGE model
graphsage = GraphSAGE(
layer_sizes=layer_size, generator=train_gen, bias=True, dropout=dropout
After Change
train_gen = GraphSAGELinkGenerator(G_train, batch_size, num_samples)
train_flow = train_gen.flow(edge_ids_train, edge_labels_train, shuffle=True)
test_gen = GraphSAGELinkGenerator(G_test, batch_size, num_samples)
test_flow = test_gen.flow(edge_ids_test, edge_labels_test)
// GraphSAGE model
graphsage = GraphSAGE(
layer_sizes=layer_size, generator=train_gen, bias=True, dropout=dropout


01.01.2017
For thermal insulation in my care was ultricies carton until the chili from the main entrence to the street front skirt and a developer chocolate manufacturing. At sauce pot vulputate ullamcorper a film on the old lake beds hate them then enhanced by leo fermentum sit for the present commoveo. Mus mauris eros dignissim tristique tincidunt urna in, for a natoque to the bow, hung up the shores of chocolate peanut none at all from suspend.
12.21.2016
For thermal insulation in my care was ultricies carton until the chili from the main entrence to the street front skirt and a developer chocolate manufacturing. At sauce pot vulputate ullamcorper a film on the old lake beds hate them then enhanced by leo fermentum sit for the present commoveo. Mus mauris eros dignissim tristique tincidunt urna in, for a natoque to the bow, hung up the shores of chocolate peanut none at all from suspend.
11.11.2016
For thermal insulation in my care was ultricies carton until the chili from the main entrence to the street front skirt and a developer chocolate manufacturing. At sauce pot vulputate ullamcorper a film on the old lake beds hate them then enhanced by leo fermentum sit for the present commoveo. Mus mauris eros dignissim tristique tincidunt urna in, for a natoque to the bow, hung up the shores of chocolate peanut none at all from suspend.
10.30.2016
For thermal insulation in my care was ultricies carton until the chili from the main entrence to the street front skirt and a developer chocolate manufacturing. At sauce pot vulputate ullamcorper a film on the old lake beds hate them then enhanced by leo fermentum sit for the present commoveo. Mus mauris eros dignissim tristique tincidunt urna in, for a natoque to the bow, hung up the shores of chocolate peanut none at all from suspend.


The main aim of developing this system is to provide blood to the people who are in need of blood. The number of persons who are in need of blood are increasing in large number day by day.
Using this system user can search blood group available in the city and he can also get contact number of the donor who has the same blood group he needs.
In order to help people who are in need of blood, this Online Blood Bank management system can be used effectively for getting the details of available blood groups and user can also get contact number of the blood donors having the same blood group and within the same city. So if the blood group is not available in the blood bank user can request the donor to donate the blood to him and save someone life.
Using this bank management system people can register himself or herself who want to donate blood. To register in the system they have to enter their contact information like address mobile number etc.
The people in need of blood can search for the donors by giving their blood group and city name. it saves time as he can search donors online without going anywhere. Using this system user can get blood in time and can save his relative or friend life. Our website work 24x7 so user can get information of blood donor any time. Blood donor can also get registered and save life of other person. The main benefit of this system is the information of available blood group. When blood is need in the operation then people have very less time to get the blood available so if he get the information like who can give him blood in time in his city is life saving. And here our system work, whenever a person need blood he get information of the person who has the same blood group he needs.


Linus Torvald Goes To Work in My Neck Of the Woods
Here. I continue to live in Beaverton, OR, but work for a company further north.
Linus continues to live in California, but works for a company in Beaverton, OR.
I don't know what that means, but it sounds cool. : )


PRIVACY MANAGER
DARPA x BBN x INVINCEA x CMU
PROTECT YOUR MOBILE SECURITY
Team Siqi Wu, Qian Wang
Mike Czapik (Engineering)
Role UX Designer/Researcher
Tool Sketch
Figma
Invision
Principle
Duration Fall 2018 Project
With the prevalence of sensor-based smart phone apps, mobile data privacy is getting more and more complex. Every moment in every day, our mobile device collects our data, and it is for sale. How can we make sure our data on smartphone devices is protected and not used by third-party companies?
The Brandeis Project is a collaboration between CMU, DARPA, BBN, and Invincea, with the aim to achieve an order of magnitude improvements for mobile privacy. Our goal is to recreate Privacy Manager and make privacy vastly transparent and easier for developers and end-users in the context of sensor-based smartphone apps.
As the Designer on the team (advised by Professor Jason Hong), my role is to reimagine the UX and UI for privacy settings in a privacy - enhanced Android OS.
01.
Privacy Home Screen
The Privacy Home interface presents users their Privacy Data Overview of the week. Users can get a brief view of their current privacy understanding including "Typical" vs "Atypical" data access filtered by the most frequently used data category, such as Camera, Location, and Contacts.
02.
Protect Data from Installation
The Installation Interface allows users to see detailed permission breakdowns, including "what" data is requested, "who" is accessing the data, and "why" is the data being accessed" from permission requests. Based on the specific app category, the Install UI categorizes all data permissions by "Typical" vs "Atypical". Users can tap on to expand cards and easily configure privacy setting by swiping "On", "Ask", and "Off" three options.
03.
Run Time Interface
The Run Time Interface appears when an app tries to access data, but users set this specific app or data permission on "Ask". It follows the same card format design and shows users transparency of the permission by identifying detailed permission requests by "who is using the data", "what the data is used for", and "why is the data being accessed".
04.
Quick Access to Privacy Manager
Quick Setting allow users to turn ALL app permission on hardware for a specific data setting "On" or "Off" at simple one click. This feature serves well for those privacy-sensitive individuals who want to cut off their data and when not in use. It also fulfill needs for users who need to go to a confidential meeting or place and prefer to turn all permissions off for a specific data type such as "Microphone".
05.
Configure by Detailed Permission
In Configuration Interface, users are able to see all current permission setting for a specific data category. Users can configure all current settings for this category by tapping on "All Permissions" feature. Users can also configure individual permission settings for a specific purpose.
In current Android OS, apps tell you what permissions they are using (e.g. location, camera), but they don't tell you:
After research and Heuristic Evaluation on the current Privacy Manager, we found the following challenges in the current design:
If apps had clearer purposes (inferred or declared by devices), then we could create better predictive models of privacy concerns, which can scale to millions of apps and users. What we propose to Android is to ask the app developers to break down privacy requests, help users to recognize typical versus atypical data requests, and give them recommended privacy suggestions.
Since we are redesigning the whole interaction of users with their privacy-sensitive data and the Privacy Manager, we have broken down the project into five parts: the Privacy Manager Home Pages, Install Interface, Configuration Interface, Run Time Interface, and Quick Setting Interface.
Our Project shows users what permissions are used for and where are the data is being sent to.
We want to make all the privacy data permissions transparent, help users configure the best privacy setting base on their preference, and at the same time, make the interaction as simple as possible under data complexity. The detailed goals for each of the five sections are listed above.
My design process for Privacy Manager breaks down into seven steps: Heuristic Evaluation, User Research, User Interview/Card Sorting, Sketching & Wireframing, Medium Fidelity Design, and Usability Testing. After several rounds of iterations, I finalize on the design and make it high fidelity.
I start from understanding the problem to Heuristic Evaluation on the current design. Then I dive into User Research where I could understand what users need and their pain points. After User Research, I conduct User Interview with potential users in different demographic groups to further get into users heads, so the products could better serve users’ needs.
After user research, we divide our target users into three groups: the young millennials, the working professionals, the elders, and some privacy highly-sensitive groups such as the military.
We found interesting contradictions among users after interviews. While most of the users indicate that they rarely configure privacy settings, they are sensitive about their data. In fact, more than half of them don’t know that their information is used or sold to third-party advertisers. Most importantly, they feel they don’t have control over their privacy.
Unsurprisingly, most users care about their privacy and how their data is being used. Nevertheless, most of the users indicated that the current Privacy system forces them to agree to privacy requests that they didn't want before they download any apps. The users are worried the apps would not function properly if they deny the data access. Most of them said that they didn't know what their information is sent or sold to third party companies.
In order to help us better understand the flow between each parts of the Privacy Settings, I have drawn out the flow diagram that shows the information architecture of the Privacy Manager, circumstances that will activate each section parts, and the connections among each section. We started by brainstorming on the whiteboard.
Later on I further digitalized the flow diagram as shown below for a clearer understanding of the system. The diagram is clickable for zoom-in purposes.
The medium fidelity prototype includes Install Interface, Notification, and Quick Settings. For each section, I conducted 3+ rounds of iterations just on medium fidelity level. For example, the first iteration of the install UI considered only to display all the information, but the second and third iterations brought up the new concept: "Typical " vs "Atypical" requests. The third version considered circumstances when privacy permission scales up and exceeds the current container box.
My initial prototype mainly focused on detailing privacy settings for different purposes and defining what data is being accessed , why the data has been requested, and who is trying to access the data.
Instead of directing users to another page, I designed pop-up box on the same page, so users will have a less obtrusive transition. I later broke down the problems into categories by listing out the Atypical Settings on the top, and collapsed Typical Settings for this app categorization.
First version categorizes permissions by “typical” and “atypical” settings. We wanted to add an “ask” option for users so the users can set permission settings only when the data is accessed at the moment. Users can click on the downward arrows to view more details regarding the specific permission.
In order to help users make safer choices with their settings, we set the typical settings for the app category to be "on" and atypical settings to be "ask". Users can easily expand each setting category to see more details such as who is accessing the data, what data type is accessed, and why the data is requested.
Since we are designing the Privacy Manager for ALL mobile users, we want to make the interaction as simple as possible while delivering all the information users want to know . We need to make our design simple to use and easy to adapt for all age groups.
We experimented the Card Sorting research method after the first round of design. The purpose for Card Sorting is to understand what information users care about the most when they configure a privacy setting.
After five rounds of Card Sorting, we realized that most users care about the “purpose” and “data type” of a privacy request the most. Users also tend to look at all the information together to see if their data is used properly.
After users interact with Privacy Manager in the Install UI, We also want to allow users to come to Privacy Manager Home Screen to gain more knowledge about their privacy standing. They will have access for more detailed configurations at Privacy Manager Home Page.
We examined the previous design for Privacy Poliy Home Page, and found the following problems that we could fix through Heuristic Evaluation:
We then did user testing on the prototype. After user testing, I received the following results:
After user testing, I removed all the explanations for each section on the home screen to make the interface look clean. The titles should be explanatory enough for users to understand. Users can click in "view details" to get more information on each section. The "Atypical Permissions" will be highlighted at the Privacy Rating section. I also designed another version of interface when a user has malsoftware such as spouseware installed on the computer. User will visually notice on the home screen by both color and privacy score change.
Our card sorting research shows that most of the users put data type/purposes as their primary concern, and they care least about user of the data. Based on this result, we designed a zoom-in effect for permissions, with which users would see the data type and purposes first, and can zoom in to see details and configure. Users would also be able to turn on/off/ask a group of permissions with one tap. The zoom-in design is applied to install UI, global settings and app settings in configure UI.
We eventually decided to use expanded cards than the regular cards. From the previous user testing result, we found out that our design was too overwhelming for users to see at the first place. The expanded cards will give users an overview of the privacy request. At the same time, it also allows users to expand and configure personally.
We would love to show our users a more direct way in grasping Privacy Overview. The new design not only gives users a brief view of their current understanding, but also the proportion of Typical vs. Atypical accesses. Users can browse through different data types and see the trends by clicking on the taps on the right.
The Privacy Rating is the new idea that I came up with to encourage users configure their privacy setting. Users are more motivated to change or find out what's wrong with their privacy when they see the score is not perfect.
We would love to show our users a more direct way in grasping Privacy Overview. The new design not only gives users a brief view of their current understanding, but also the proportion of Typical vs. Atypical accesses. Users can browse through different data types and see the trends by clicking on the taps on the right.
Detailed configuration page allows users to turn "On" "Ask" or "Off" on All Permissions in a simple way. It makes privacy configuration easier for all end users.
Our project has not ended :) We are in the processing talking to many sponsors and partners. For future iterations, I will conduct more user testings on current design and iterate from feedback. In the meanwhile, I will work on building new on-boarding screens to walk users through Privacy Manager home screen and introduce functionalities for each section. I will also design detailed pages inside each section under "View More". I believe design is a constant process, and there is always more to improve.
If you are interested in learning about our progress, I am always happy to chat more about my updates!


J.J. Watt’s Tweet About Chase Young Is Going Viral
by Andrew McCartyOn Saturday afternoon, the Ohio State Buckeyes hosted the Penn State Nittany Lions in what was billed as a battle of two of the best programs in the Big Ten.
Ohio State took a 14-0 lead into halftime after dominating the game on the ground for the opening 30 minutes. A comeback attempt from Penn State fell short as the Buckeyes escaped with a 28-17 win.
The best player of the game was Ohio State defensive end Chase Young.
The All-American took over in the final few minutes of the game, wreaking havoc on the Penn State offensive line. Fans watching from home are calling for Young to get an invite to New York for the Heisman Trophy ceremony.
Even an NFL star has taken note.
Former Wisconsin defensive end J.J. Watt took note of how “special” Chase Young is.
Young is arguably the best player on the field – every time he takes the field. He’s the defensive player of the year, and should be in the conversation for the Heisman.

Next up for Ohio State is the biggest rivalry game of the year as the Buckeyes travel to Ann Arbor for a battle with the Michigan Wolverines.


Search for « 45 did » for example…
This example shows how to use the ngeo-search directive, which is based on Twitter's typeahead component.
ngeo-search
typeahead


One of the constant annoyances to me in web applications is the self-proclaimed need for those applications to know about everything and do everything, and only spotty ad hoc techniques for including things from other applications.
An example might be blog navigation or search, where you can only include data from the application itself. Or "Recent Posts" which can only show locally-produce posts. What if I post something elsewhere? I have to create some shoddy placeholder post to refer to it. Bah! Underlying this the data is usually structured in a specific way, with the HTML being a sort of artifact of the database, the markup transient and a slave to the database’s structure.
An example of this might be a recent post listing like:

for post in recent_posts:

{{post.title}}

There’s clearly no room for exceptions in this code. I am thus proposing that any system like this should have the notion of a "link" as a first-class object. The code should look like this:

for post in recent_posts:

{{post.link()}}

Just like with changing IDs to links in service documents, the template doesn’t actually look any more complicated than it did before (simpler, even). But now we can use simple object-oriented techniques to create first-class links. The code might look like:
class Post(SomeORM):
def url(self):
if self.type == 'link':
return self.body
else:
base = get_request().application_url
return '%s/%s/%s/%s' % (
base, self.year, self.month, self.slug)
def link(self):
return html('%s') % (
self.url(), self.title)
The addition of the .url() method has the obvious effect of making these offsite links work. Using a .link() method has the added advantage of allowing things like HTML snippets to be inserted into the system (even though that is not implemented here). By allowing arbitrary HTML in certain places you make it possible for people to extend the site in little ways — possibly adding markup to a title, or allowing an item in the list that actually contains two URLs (e.g., Some Item (via)).
In the context of Python I recommend making these into methods, not properties, because it allows you to later add keyword arguments to specialize the markup (like post.link(abbreviated=True)).
One negative aspect of this is that you cannot affect all the markup through the template alone, you may have to go into the Python code to change things. Anyone have ideas for handling this problem?
Automatically generated list of related posts:
- Atompub as an alternative to WebDAV I’ve been thinking about an import/export API for PickyWiki; I...
- Hypertext-driven URLs Roy T. Fielding, author of the REST thesis wrote an...
- HTML Accessibility So I gave a presentation at PyCon about HTML, which...
- lxml: an underappreciated web scraping library When people think about web scraping in Python, they usually...
Interesting post! If you’re interested in this concept, Adam Gomaa has taken this basic idea, but in a different direction by (ab?)using Properties. It’s interesting to look at both similar approaches, I think. http://adam.gomaa.us/blog/the-python-property-builtin/
I prefer to configure my template engine to render a link to an object simply by naming it; in Mako for example, this can be done by specifying a filter which sniffs the class of whatever object is being rendered, and converts it to a properly formatted string. This approach scales beyond simply linking to domain objects — one might apply to every
int
orfloat
aspan
of classnumber
, or something like that. It also keeps such rendering logic cleanly factored out of the domain model.How about keeping the HTML in the template with the same (or even more) flexibility:
{{post.title()}}
.Hi Ian,
I agree with the initial 40% of your idea, the rest, I think, pushes too much the View layer into the Control layer —
post.link()
will likely output links with classes and/or ids (even when assuming inline JavaScript is strictly forbidden), which introduces a high dependency/risk of keeping the Control code in sync with the View whenever the web team refactors/updates the design.I believe a balance can be achieved when
post.link_href()
outputs the content of href and nothing else, whilepost.link_text()
returns the a link text.Jerry
P.S. How to disable/escape underscore Markdown formating? [for cases like these using backticks renders it as code and no markup is not interpreted inside the backticks -- Ian]
The URL approach seems sound, with the primary issue being that web frameworks like to abstract the URL away from the object itself via routing. Most web frameworks would rather see you grab the url via a “reverse” method, rather than hard-coded into the Model itself:
URI-aware objects provide consistency and extensibility.
Yeah, I agree with Rudolph — why not give the model objects a
url()
method that simply outputs the URL itself? This lets the designer/template define custom classes for the link.Regarding Marcus’ point about relying on a framework’s reversing logic — IMHO, that’s going a bit too far, and I never use
reverse()
stuff in model URL methods. I tend to see this as an acceptable breach of the DRY principle, because it’s a lot more efficient just to hard-code the URL-generating logic directly in theurl()
method (as opposed to relying on the reverse logic).It’s sort of like denormalizing a database for performance. If you’re outputting a list of links and each one is calling
url()
, which in turn callsreverse()
…whew! That’s a lot of unnecessary overhead.Sure, the
.link()
method (in my example) isn’t entirely necessary, far more important is the.url()
method. I wish, though, that there was a way of doing object-oriented display code that is also designer-friendly. For example, if you do allow for something like a compound link (as with the via example), coding that into every template where you display a link is entirely infeasible.One way of handling this would be to use template functions or blocks. Then you can centralize the logic of link display (making it easier to extend that logic) while still putting it somewhere a designer can find. Backtracking rendered code to these template functions isn’t that easy, but that’s something that should be fixed — it should be much easier to see a bit of rendered code and backtrack to where that code was defined.
In Grok/Zope-land, I just create as many IAbsoluteURL adapters as I have object classes that I want to assign URLs to, and the component framework swings into action and invokes the right one when a view asks for some object’s URL. That way my models do not accumulate interface-specific information about where they live, which would be deeply troubling, and yet I have a way to maintain the URL information alongside my models in a way that I find scalable.
See slide 147 of [my NOLA Grok talk](http://rhodesmill.org/brandon/2008/nola-plone-symposium-talk/) for an example of how a URL factory looks when you build it for one of your own types. I should nudge the Grok folks to make that take less lines and look less grungy. Like maybe three lines. Yeah, three lines.
In this case using interfaces is similar to generic functions (and has relatively little to do with an “interface”). Using PyProtocols it might look like:
Of course in Zope you’d probably have separate class types; outside of Zope it’s more common to use a single class that’s more connected to the storage type (e.g., a one-to-one mapping of class to database table).
Generally, I’m not sure the complexity of the indirection pays off much. In theory there’s some important separation going on there, but in practice I’ve never seen it. Given a RESTful approach, there actually isn’t a distinction at all — an object is at its URL, this is not just an implementation detail. I don’t think of the web as an implementation detail, in my mind it is core to the application itself.
That said, creating URLs without some kind of helper is also a needless waste of time and causes bugs (e.g., not allowing for application path prefixes, not quoting segments properly, or spending an inordinate amount of time formatting query string parameters). And once you have a helper, you’ve got at least some indirection happening.
Not sure what you’re gaining by pushing your view helpers into the model layer. You’re concerned about your posts keeping the same URL/slug, but throwing link helpers into your models is going to hinder more than it will help.
This is how it would be done with Ruby/ERB:
Or perhaps if you find yourself creating links to posts often, use a template helper:
I just build some Mako defs that deal with URLs for certain types of objects. The main point of the “def” in Mako is a place that you can put programmatic view logic.
(something is wrong with your markdown formatting, or I’ve just drank too much tonight)
The filter method someone mentioned above can work with this, though I don’t use filters that way myself that often.
I think that template helpers / template tags and a url method achieves the desired effect. The instance can return its url via a url() method and the template helpers can manage markup.
This keeps the separation of concern between the model and templates. Also designers have specific areas in which they can manage / inspect templates should they want to extend or change markup.
How you handle template helpers is another area for debate – you could use template fragments in separate html files (keeping the designers away from code) or return strings from the helper methods – but then is that as bad as declaring them in the model? Probably not, I’d say its still slightly better but its a matter of preference. I’d choose the latter if my designers had a high level of competence with scripting languages i.e. frontend developers.
My biggest issue in working with links has been how to handle transformations gracefully. For example, I would prefer my links to be absolute at all times. This reduces ambiguity between links generated from content and links within the actual application. Along the same lines, when the application is made of smaller microapps (as you’ve advocated), having an easy way of creating these links effectively can be difficult.
One method I’ve used is the idea of a resolver. The application might keep the current pattern for a link generated from data, but the resolve allows for previous patterns to also be used. It also allows for a catalog of bases to be used (ie XML Catalog). This idea is based entirely on creating a custom URL resolver for XSLT, which most XSLT processing libraries support.
The point here is that I agree links should be first class objects in addition to having a framework or controller in place for managing them that goes beyond simple parsing/routing.