Friday, November 2, 2018

registration - Email registered by someone else - First time Login / Register



I am working on a system where the administrators can add information about potential users. So a user can exist without even knowing it.


Current Login:


Current login - regitered by someone else


At this moment there is an extra input field (see above) to check if someone registered you already. This seems rather clumsy to me. This is actually the first step of the registration progress in case the email is not yet known, wich seems even clumsier to me. Also the field doubles as a "forgot my password" field. This might seem handy from a developers perspective, but I think UX-wise it is not working. If only because nobody uses this pattern and it will confuse people rather than help them.


I am thinking of incorporating the "email lookup" functionality in the standard login / register form; If someone enters an email that is registerd (but not activated) he gets an immediate inline notification.


What are your thoughts on this?



Answer



A few companies such as Amazon and Google (login pages linked) have the user start with their email before anything else, then take action afterwards. To apply this to your situation:



  1. User enters their email (only field available at start)


  2. If registered, prompt them to enter their password, then login.

  3. If registered but not activated, prompt them to complete registration.


If they fail to login in case 2, you could reveal a "forgot my password" button.


InDesign grep rule that applies to everything then stops if it reaches a certain character?


InDesign GREP rules can get a bit mind-bending. Suppose you want a paragraph style with a GREP style rule that applies a character style to everything except text after a certain character. Something that doesn't apply to characters after a certain character, but applies to everything else?


For example, imagine a long list of article titles. Some are short titles, some are two parts with a short title then a colon then an elaboration. You want the whole of the short title ones to be emphasised, and everything up to and including the colon to be emphasised in the long ones:




  • Adders of Angola

  • Brilliant Badgers: the brawniest beasts of Britain

  • Caravanning Crazes of Coastal Canadian carp

  • Danger: the dastardly ducks of Denmark




I've tried a bunch of rules but none seem to work for this. I thought it might be possible using a 'negative lookbehind', like (? or something, but nothing like that seems to work: it looks as if 'lookbehinds' and 'lookaheads' can only apply to the character immediately before the character you're looking for.


Any GREP experts got any ideas?




Here's one thing I figured out after a lot of browsing and trial and error, which I think logically should work, but doesn't work, for reasons I can't figure out:


\<[^:]*|\<[^:]*:

In theory, that should mean "Grab everything from the paragraph start until the end of the first run of characters that aren't ':', or, if there's a run of characters that aren't ':' from paragraph start until a ':', grab that including the ':'".


In practice, it just applies to everything. Can't figure out why.



Answer




I don't have InDesign to check this, but assuming it behaves the same as the tester here, I believe this should work:


^.*?(:|$)

That's just matching everything from the start of a string up to either the first colon or the end of the string.


InDesign CS4 or CS5: How do I export tiles to a PDF?


Let's say I have a document which is 30 inches by 30 inches. My printer is 11x17. I need to print tiles.


Let's also say that the printer is attached to a computer which doesn't have InDesign, but does have Acrobat, so I need to export my fie to a PDF in order to print to the printer.


How do I get a PDF which is made of tiles?


I can use the Print function to print tiles, manually or automatically. I can Export to PDF. But I can't figure out how to Print to PDF or save my print job as a PDF and have it come up as tiles. (I tried using the Save As PDF option and the PDF which was generated couldn't be opened; my Mac kept spitting back an error.)



Is there a way to do this from InDesign, or do I have to create a PDF with four identical pages and create tiles manually by cropping in Acrobat?



Answer



You can tile directly from Acrobat in the print dialog. They call it "Poster," but what it does is automatically create tiles based on the chosen page size. The screen grab shows what happens with a PDF of a billboard, 77 inches wide in the file, 48 feet wide "in the air."


enter image description here


Thursday, November 1, 2018

What feelings does my logo design invoke



I am a software developer, setting up a new company called mascot to sell my services. I don't really have design skills, but needed to make me a logo, so came up with this luck waving cat to be my mascot logo. I am hoping it's friendly, fun and professional looking, but historically have been a bit off the mark on all counts, so wanted to check with the community what kind of reaction this logo invokes.


enter image description here


p.s. if this is not the right forum to ask this kind of question, can someone point me to the right place to do so?


update:


Thanks everyone for such awersome feedback - I tried to take it all on board, and had a go at a second iteration. No colours, more considered shape, more friendly, based on hand drawn sketch.


I am not sure how to get feedback from you guys on the iteration, is this question locked for comment now it is on hold? I would love to know what folk think about cat mark two, especially with regards to original criteria: fun, friendly, professional


enter image description here


update two:



Ok, how about a much more geometric approach to the original idea?


enter image description here



Answer



I'm going to try and be as kind as I can, please be aware that I do not wish to offend you or to seem as if I'm devaluing your efforts. It is very difficult to give design advice to non-designers if they feel overly emotionally attached to their artwork. I do not know you, your personality, your emotional attachment to that image, etc.




First....


Initial impression.... That, in my opinion, is not a "logo". It's a silhouette of a cat with some colors thrown in the middle. To me, it's a rather "creepy" looking cat. The uppercase "M" may even push the perception to a "creepy squirrel" due to the apparent buckteeth conveyed by the M.


Now, reduce the artwork, as all logos should work well at small sizes....


enter image description here


Comes across as a black squirrel to me. The last thing I'd perceive is "friendly" or "happy" .. rather more along the lines of "death squirrel" or "halloween squirrel".



I would suggest you scrap this and start over. There's no repair to be made to this image in order to get it to "logo" status, even remotely. The lack of clarity, detail, and definition are all so severe that the overall design is merely poor and unsalvageable.




Be aware that a logo is the #1 most important, all encompassing, image any business will ever use. In an instant it conveys a wealth of information to any potential clients/customers.


Choosing to "do it yourself" is really not always the best option if you are serious about your business. Design isn't "rocket science" and there are many, many things one may actually be in a position to complete themselves. However logos really can't be some image you've slapped together until you are happy. There are a lot of underlying connotations which are conveyed by a logo.


I would honestly suggest hiring a designer or finding a friend/colleague with some design skills to help. Not everyone who plays basketball can be Labron James, and, well, your design skills with respect to a "logo" need some help. If a business is to be successful, they need to treat branding the same as they'd treat any product or service they provide -- if the branding (logo) looks terrible, that is the exact impression you give prospective clients about your business.


QuantLib Python Swap Yield Curve Bootstrapping Dates and Maturities


This is somewhat related to the question I asked here but simpler. I am trying to bootstrap a yield curve from swaps, and am having a problem with the dates/maturities that are coming out. The code I'm using is below, and the issue that I'm having is that when the results are returned the Maturities field is not matching the maturities I'm inputting.



import QuantLib as ql
from pandas import DataFrame
import matplotlib.pyplot as plt
import csv

def get_spot_rates(yieldcurve, day_count, calendar=ql.UnitedStates(), months=121):
spots = []
tenors = []
ref_date = yieldcurve.referenceDate()
calc_date = ref_date

for yrs in yieldcurve.times():
d = calendar.advance(ref_date, ql.Period(int(yrs*365.25), ql.Days))
compounding = ql.Compounded
freq = ql.Semiannual
zero_rate = yieldcurve.zeroRate(yrs, compounding, freq)
tenors.append(yrs)
eq_rate = zero_rate.equivalentRate(day_count,compounding,freq,calc_date,d).rate()
spots.append(eq_rate*100)
return DataFrame(list(zip(tenors, spots)),columns=["Maturities","Curve"],index=['']*len(tenors))


swap_maturities = [ql.Date(9,9,2016),
ql.Date(15,9,2016),
ql.Date(22,9,2016),
ql.Date(29,9,2016),
ql.Date(11,10,2016),
ql.Date(9,11,2016),
ql.Date(8,12,2016),
ql.Date(10,1,2017),
ql.Date(8,2,2017),
ql.Date(8,3,2017),

ql.Date(8,6,2017),
ql.Date(8,9,2017),
ql.Date(8,3,2018),
ql.Date(10,9,2018),
ql.Date(10,9,2019),
ql.Date(10,9,2020),
ql.Date(9,9,2021),
ql.Date(8,9,2022),
ql.Date(8,9,2023),
ql.Date(10,9,2024),

ql.Date(10,9,2025),
ql.Date(10,9,2026),
ql.Date(8,9,2028),
ql.Date(10,9,2031),
ql.Date(10,9,2036),
ql.Date(10,9,2041),
ql.Date(10,9,2046),
ql.Date(8,9,2056)
]


swap_periods = [ql.Period(1,ql.Days),
ql.Period(1,ql.Weeks),
ql.Period(2,ql.Weeks),
ql.Period(3,ql.Weeks),
ql.Period(1,ql.Months),
ql.Period(2,ql.Months),
ql.Period(3,ql.Months),
ql.Period(4,ql.Months),
ql.Period(5,ql.Months),
ql.Period(6,ql.Months),

ql.Period(9,ql.Months),
ql.Period(1,ql.Years),
ql.Period(18,ql.Months),
ql.Period(2,ql.Years),
ql.Period(3,ql.Years),
ql.Period(4,ql.Years),
ql.Period(5,ql.Years),
ql.Period(6,ql.Years),
ql.Period(7,ql.Years),
ql.Period(8,ql.Years),

ql.Period(9,ql.Years),
ql.Period(10,ql.Years),
ql.Period(12,ql.Years),
ql.Period(15,ql.Years),
ql.Period(20,ql.Years),
ql.Period(25,ql.Years),
ql.Period(30,ql.Years),
ql.Period(40,ql.Years)
]


swap_rates = [0.37,
0.4025,
0.4026,
0.399,
0.3978,
0.4061,
0.41,
0.4155,
0.4273,
0.4392,

0.461,
0.4805,
0.5118,
0.538,
0.587,
0.638,
0.7,
0.756,
0.818,
0.865,

0.913,
0.962,
1.045,
1.137,
1.2355,
1.281,
1.305,
1.346
]


""" Parameter Setup """
calc_date = ql.Date(1,9,2016)
ql.Settings.instance().evaluationDate = calc_date
calendar = ql.UnitedStates()
bussiness_convention = ql.ModifiedFollowing
day_count = ql.Actual360()
coupon_frequency = ql.Annual

""" SwapRateHelper """
swap_helpers = []

for rate,tenor in list(zip(swap_rates,swap_periods)):


swap_helpers.append(ql.SwapRateHelper(ql.QuoteHandle(ql.SimpleQuote(rate/100.0)),
tenor, calendar,
coupon_frequency, bussiness_convention,
day_count,
ql.Euribor3M()))

rate_helpers = swap_helpers

yc_linearzero = ql.PiecewiseLinearZero(calc_date,rate_helpers,day_count)
yc_cubiczero = ql.PiecewiseCubicZero(calc_date,rate_helpers,day_count)

max_maturity = 40*12

splz = get_spot_rates(yc_linearzero, day_count, months=max_maturity + 1)
spcz = get_spot_rates(yc_cubiczero, day_count, months=max_maturity + 1)

max_rate = swap_rates[-1]
min_rate = min(splz.Curve)

max_rate = max(splz.Curve)

"""Plotting"""
plt.plot(splz["Maturities"],splz["Curve"],'--', label="LinearZero")
plt.plot(spcz["Maturities"],spcz["Curve"],label="CubicZero")
plt.xlabel("Years", size=12)
plt.ylabel("Zero Rate", size=12)
plt.xlim(0,max_maturity/12.0)
plt.ylim([min_rate * 0.9,max_rate * 1.1])
plt.legend()


plt.show()

rows = zip(splz.Maturities,splz.Curve)

with open('OISBootstrap.csv','w',newline='') as f:
writer = csv.writer(f)
for row in rows:
writer.writerow(row)


Anyone with Python and QL can run the whole thing and see the results, but for example I'm getting the following values for the last five Maturities: 15.2361111111, 20.3111111111, 25.3777777778, 30.45, 40.5972222222 instead of 15, 20, 25, 30, and 40.


Thanks in advance for what I assume is a pretty newb question.



Answer



15 years does correspond to t=15.236 according to the day counter you told the curve to use.


First, you can't get exactly 15 anyway. Your calculation date is September 1st, 2016; according to the usual conventions, the swap whose rate you're quoting starts spot, that is, two business days after the calculation date. Given the weekend (your calculation date is a Thursday) and the holiday on Labor Day (September 4th) this lands you on September 6th. Thus, the 15-years swap would have its maturity on September 6th, 2031; but that's a Saturday, so it rolls to September 8th, 2031 (also, your input maturity is September 10th, so you might want to check that, too). That's 15 years and a week after your calculation date, which is also t=0 for your curve (since you're passing it to its constructor as reference date).


Second: you're passing to the curve a day count convention of Actual/360, for which one year doesn't correspond to 1, but to 365/360=1.01389 (or 366/360 on a leap year).


Putting all together, you get that the 5485 days between the calculation date and the maturity of the 15 years swap correspond to 5485/360=5.23611. Similar calculations apply to the other maturities.


Using Actual/365 (Fixed) gives results closer to what you would expect, since it corresponds to t=1 for a "regular" year; but since leap years correspond to 366/365, you still get t=5485/365=15.0274.


Other day counters have better properties for calculating rates (for instance, Act/Act gives you t=1 for 1 year) but I don't advise using them in term structures, since they lack other properties; for instance, there exist pairs of dates $d_1$ and $d_2$ for which the time $T(d_1,d_2)$ between them is 0, or triples $d_1$, $d_2$, $d_3$ for which $T(d_1,d_3) \neq T(d_1,d_2) + T(d_2,d_3)$.


What I suggest instead is that you work with dates directly. In your get_spot_ratesfunction, instead of trying to recalculate the maturity dates as



d = calendar.advance(ref_date, ql.Period(int(yrs*365.25), ql.Days))

call yieldcurve.nodes(), which gives you the list of pairs (date,rate) corresponding to each maturity. You can use those dates in the call to equivalentRate, as you already do, and also in the call to yieldcurve.zeroRate.


(And by the way, calendar.advance(ref_date, 365, Days) doesn't do what you think. It advances the date by 365 business days, which is a lot more than one year.)


vector - How to edit clip path?



The Inkscape FAQ states:



In fact, if you use a path as the clipping object, you can actually edit the clip path without having to Release it. First select the clipped object, then choose the Node Editing Tool. Your clip path will be outlined Green, with the normal path editing nodes visible.



Well, I have clipped a bitmap with a path. Yet, when I select the clipped object with the tool "Edit paths by nodes (F2)", then I get no path editing nodes. There is just a dotted outline around the object.


I am using Inkscape 0.48.5 on Windows 7 x64.


Am I doing something wrong? Is my version of Inkscape not capable of doing that? Something else?


Screenshot illustrating the issue



Answer



You can do this, but you have to enable "Show clipping path(s) of selected object(s)"



Imgur


For smaller screens :


Imgur


Also, when you move the image, the clip path doesn't move with the image, so things like this can happen:


Imgur


usability - Search field with or without a button?


I can see two broad patterns as far as the design of the search field is concerned. One like we see on Google has a button that the user can hit to initiate Search. (They could also hit enter to do so)


The other pattern much like what is on this site (stackexchange) do not have a button. So the only way the user can initiate search is by hitting enter.


Has anyone done any research or analysis of this pattern ? What I have noticed is that search fields without the explicit search button (that normally is a magnifying glass) have "Search" as placeholder text, left aligned, whereas when there is no button the placeholder is usually a "Magnifying glass icon" with "Search" all left aligned.




technique - How credible is wikipedia?

I understand that this question relates more to wikipedia than it does writing but... If I was going to use wikipedia for a source for a res...