沒想到是四年前的文章了...
會突然有感,是因為最近有碰到被 coaching 的小夥伴在查 stack overflow 相關資料,並嘗試解決他所碰到的問題之後,就繼續先往下工作了。(這並沒有錯,工作時間嘛,事有緩急)
不過觀察到這情況後,我好奇問了一下他相關的問題。
「你知道這樣寫,跟那樣寫的差異在哪裡嗎?」
「你看這個被標的解答,跟下面那個投票很多的解答,哪一種寫法好?你剛剛貼的那個被標為解答的,雖然解決了你的問題,但為什麼再下面那一篇的 vote 數那麼高?」
「你有發現解答下面還蠻多 reference link 的嗎?就你過去的習慣,從 stack overflow 上解決了你工作碰到的問題之後,你會有後續的其他動作嗎?」
a few minutes later....
91:「學習的起點,通常也是難度很高的點,是發現自己的無知跟未知。當你發現一個東西你不會、不知道時,你才可能學會它。
你好不容易可以在 routine 的工作裡面,碰到一個你不會的東西,已經發現了自己的未知了,卻只是應付工作上的問題,不求甚解。反正下次再 google 下次在 stack overflow 上還是可以找到其他人的解答。
那你這根本沒在學習,你只是在應付。
舉例來說,你碰到了一個 C# 裡面應該用 throw; 而非 throw ex;
你應該問,為什麼?明明 throw ex; 看起來直覺很多啊。
而且你不應該只問為什麼,不應該只知道 throw 跟 throw ex 的差異,你應該順便了解 Exception 身上有哪些東西,怎麼記 exception 的 log,為什麼有一堆東西是 readonly 的,為什麼有 4 個 constructor,該怎麼自訂自己的 Exception,為什麼需要自訂 Exception,怎麼處理 error handling,誰丟 exception 出來才是對的,誰攔 exception 處理才是對的。
什麼情況適合用怎樣的作法,來解決你實務上的需求情境。」
這些,才是從一個你未知的點,擦出火花之後,學習知識點,再到知識面。
這,才叫學習。
同時也有2部Youtube影片,追蹤數超過15萬的網紅pennyccw,也在其Youtube影片中提到,No matter how many shots he took, Allen Iverson couldn't beat the Atlanta Hawks by himself. Iverson scored 53 points, the fifth-highest total of his ...
「throw exception c」的推薦目錄:
- 關於throw exception c 在 91 敏捷開發之路 Facebook 的精選貼文
- 關於throw exception c 在 91 敏捷開發之路 Facebook 的最佳解答
- 關於throw exception c 在 辣媽英文天后 林俐 Carol Facebook 的精選貼文
- 關於throw exception c 在 pennyccw Youtube 的最佳貼文
- 關於throw exception c 在 pennyccw Youtube 的最讚貼文
- 關於throw exception c 在 How can I throw an exception in C? - Stack Overflow 的評價
- 關於throw exception c 在 Itanium C++ ABI: Exception Handling ($Revision: 1.22 $) 的評價
- 關於throw exception c 在 Exception specifications (throw, noexcept) (C++) - cpp-docs 的評價
- 關於throw exception c 在 8.01 Introduction to Exception in C++, try-catch-throw - YouTube 的評價
throw exception c 在 91 敏捷開發之路 Facebook 的最佳解答
C#, try/catch when 的寫法。
我竟然錯過了 C# 6.0 這麼漂亮的寫法 (之前只看到用在 switch case)
※ 那段 WinDbg 出來的內容,可以看到兩種寫法雖然執行結果一樣,但要看 exception 相關資訊時來進行偵錯,就差很多了!
而且至少寫法漂亮一點了,畢竟 exception 在 error handling 時,的確很常會依據條件來進行決定 handle 或不 handle, 可以省掉不必要的 throw。
補上 MSDN when 的說明:https://docs.microsoft.com/…/language-referen…/keywords/when
throw exception c 在 辣媽英文天后 林俐 Carol Facebook 的精選貼文
<3 俐媽英文教室:誠品書店退換貨&退稅篇
書中自有黃金屋,更何況是書店呢?有空去逛逛吧!
RETURN POLICY
policy (n.) 政策(Honesty is the best policy. 誠實乃為上策。)
damage (v.)(n.) 損壞(片: do damage to N 對...造成損壞)
item (n.) (商品)品項
exchange (v.)(n.) 交換(+ A + for + B )
require (v.) 要求(+ sb. + to V / + that + S + should + V)(衍: requirement n. 要求/ meet ... requirement 符合...要求)
invoice (n.) 發票
receipt (n.) 收據(衍: receive v. 收到/ recipient n. 受贈者(反: donor n. 捐贈者)/ receiver n. 話筒/ reception n. 接待/ receptionist n. 接待人員)(-ceiv/-cept: take)
refund (v.)(n.) 退錢
audio-visual (a.) 視聽的(audi-: listen/ vis-: look)(衍: auditory a. 聽覺的/ vision n. 視覺;視力;視野)
product (n.) 產品(衍: produce v. 生產;n. 農產品/ production n. 生產過程/ productive a. 多產的/ productivity n. 生產力)(pro-: forward/ -duct: lead)
remain (v.) 保持(衍: remaining a 剩下的/ remains n. 餘數)
pristine (a.) 原始的;原本的(pri-: first)
condition (n.) 狀況;條件(衍: unconditional a. 無條件的)
due to (ph.) 因為(= because of = owing to = on account of = as a result/consequence of)
intellectual (a.) 聰明的;智慧的(衍: intellect n. 聰明)(-lect: choose)
property (n.) 財產(intellectual property right 智慧財產權)(衍: proper a. 合適的)
accept (v.) 接受(衍: acceptable a. 可接受的/ acceptance n. 接受)(ac-: to/ -cept: take)
shrink (v.) 縮小;縮水(-shrank-shrunk);(n.) 縮小;精神科醫師(反: expand v. 膨脹;擴張)
wrap (v.) 包裹;包裝(wrapping paper 包裝紙)(shrink-wrap 用塑膠膜包裝)
exception (n.) 例外(原: except prep. 除...之外)(ex-: out/ -cept: take)(... be no exception ...也不例外)
instrument (n.) 儀器;器具;樂器(衍: instrumental a. 儀器的;樂器演奏的;有幫助的)
APPLICATION FOR TAX REFUND NOTIFICATION
application (n.) 申請(application form 申請表)(衍: apply for 申請/ applicant n. 申請人)(ap-: to/ -ply: fold, weave)
notification (n.) 通知(原: notify v. 通知+ sb. + of N / that + S + V)
purchase (v.)(n.) 購買
relevant (a.) 相關的(衍: relate v. 與...有關聯/ relation n. (政治;外交)關係/ relationship n. (人際;愛情;性)關係/ relative a. 相關的;n. 親戚)
documentation n. 文件統稱(衍: document n. 文件/ documentary n. 紀錄片)
equivalent (n.)(a.) 相等的(+ to + N)(equ-: equal/ -val: strong)
include (v.) 包括(衍: inclusion n. 包含/ inclusive a. 包含的/ S + V, including A, B, C = S + V, inclusive of A, B, C)(反: exclude v. 排除/ exclusive a. 除外的;獨家的/ exclusion n. 排除)(-clus: close)
tax (n.) 稅(taxpayer 納稅人)
arrival (n.) 抵達;入境(衍: arrive v. 抵達)
departure (n.) 離開;出境(衍: depart v. 離開)
assign (v.) 指定(衍: assignment n. 指定工作;指定作業)
temporary (a.) 暫時的(反: permanent = eternal = perpetual = everlasting a. 永遠的)
permit (n.) 許可證;(v.) 允許(衍: permission n. 允許)(per-: all/ -mit: throw)
location (n.) 地點(衍: locate v. 座落/ be located + 介系詞 + 地點 ...座落於...)
furthermore (adv.) 此外(= besides = moreover = what's more = in addition = additionally)
throw exception c 在 pennyccw Youtube 的最佳貼文
No matter how many shots he took, Allen Iverson couldn't beat the Atlanta Hawks by himself.
Iverson scored 53 points, the fifth-highest total of his career, but Joe Johnson had 24 to lead the Hawks over the Philadelphia 76ers 111-108 on Friday night.
"I'm as disappointed as everybody else on my team," Iverson said. "We wanted to go into the holidays with a win. We'll have to get this one out of our system and come back to work."
Zaza Pachulia added a career-high 23 points, including the go-ahead free throws, and Al Harrington scored 22 for Atlanta, which won its fourth straight at home and its fifth in the last seven games overall.
"We shared the ball," Pachulia said. "We had 29 assists, and that's great. We shot pretty good also, 54 percent. It's tough to beat a team like that."
Iverson, who entered with a league-best 33.5 scoring average, had 21 points and six rebounds in the first half. He shot 17-of-31 and hit 19 of 21 free throws, the last coming on a three-point play that cut the Atlanta lead to 101-100 with 5:20 remaining.
He broke the record that Shareef Abdur-Rahim set at 7-year-old Philips Arena with a 50-point performance against Detroit on Nov. 23, 2001. Iverson has scored 50 in nine games, including a career-best 60-point effort in a 112-99 win over Orlando last Feb. 12.
Iverson gave the Sixers their last lead when his runner over Johnson and Pachulia made it 105-104 with just under 3 minutes remaining. Pachulia then made two free throws, then added a jumper for a three-point lead.
On Philadelphia's last five possessions, John Salmons missed two straightaway 3-point attempts and had a fast-break layup blocked by Atlanta's Josh Smith.
"When someone is scoring like that, everybody else isn't involved," Harrington said. "When they do shoot, they're ice cold, so that worked in our favor."
Iverson drove past Salim Stoudamire and Harrington after a steal for the Sixers' last basket, a layup that cut Atlanta's lead to 110-108 with 36 seconds remaining. Philadelphia had the ball with 2.4 seconds left when Iverson made an inbounds pass in front of the Atlanta bench to Chris Webber, who missed an 8-foot turnaround jumper.
"I told him before the play that if both men went to me, to go to the basket and get a good shot," Iverson said. "Things didn't go the way we wanted tonight."
Johnson made one free throw, then jumped to intercept Andre Iguodala's long pass from the Hawks' baseline.
Two free throws by Iverson gave the Sixers their biggest lead at 82-70 in the third quarter, but the Hawks went on a 26-9 run to go up 96-91 on Stoudamire's fast-break layup.
"We showed a lot of character coming back from 12 down," Atlanta coach Mike Woodson said. "I thought Iverson was tremendous tonight. He created so many problems for us, but I like that we found a way to overcome that and get the win. We had a number of guys step up in the fourth quarter."
Sixers coach Maurice Cheeks could tell a big difference when center Samuel Dalembert picked up his fifth foul with 9:02 remaining.
"Our defense is a lot better with Sam in the game, because he can block shots and rebound the ball," Cheeks said. "They're a jump-shooting team, with the exception of Harrington. We just have to get better in all areas defensively."
Game notes
Iverson stayed home Thursday night to take care of an undisclosed personal matter before joining the Sixers for the morning shootaround Friday. ... Philadelphia F Michael Bradley did not make the trip because his wife was expecting to give birth. ... Johnson had eight assists. ... Webber added 16 points and 11 rebounds for the Sixers. ... Iverson, who leads the NBA in minutes, played the entire second half
throw exception c 在 pennyccw Youtube 的最讚貼文
The Philadelphia 76ers appeared
headed for their first loss of the season. Then Sportsmanship
Award winner Eric Snow was ejected for fighting.
Snow's shoving match with Tracy McGrady and ensuing ejection
sparked the 76ers, who rallied without their point guard for an
87-83 victory over the Orlando Magic.
The Sixers had just one free throw in the first five minutes of
the fourth quarter as the Magic opened a 72-68 lead. With 6:26
left, McGrady went up for a lane jumper and took exception to a
foul by Snow.
McGrady said something to Snow, who responded by putting his
finger in McGrady's chest. McGrady put both hands on Snow's
face and shoved him and both players were ejected.
"I said, `Get out of my face,'" Snow said. "He pushed me in the
face and I walked away clapping and they kicked us both out."
"I don't tough you, you don't touch me," McGrady said. "Don't
put your hands on me. And I retaliated after that. He touched
me and I reached out and that was that."
Snow sneered when his reputation as a hard but clean player was
brought up, while Magic coach Doc Rivers said his player should
have seen it coming.
"Sportsmanship? What's that got to do with anything?" Snow
said. "I didn't initiate it, you know what I'm saying? And I
don't care who you are in this league, you can be the best
samaritan in the world, but if someone pushes you, you got to
defend yourself."
"I try to tell Tracy that he is the target now," Rivers said.
"Guys are going to push and hit him, but if he's struggling
offensively, he can't get frustrated that he lets anybody get
under his skin."
Sixers players and coach Larry Brown argued the ejection of Snow
and center Theo Ratliff drew a technical foul. Orlando guard
Darrell Armstrong made the free throw for a 73-68 lead but the
Magic scored just seven points thereafter.
McGrady's departure hurt the Magic, who had to rely on a hobbled
Grant Hill and struggled to score down the stretch. Meanwhile,
Vernon Maxwell came on for Snow and teamed with fellow guards
Allen Iverson and Aaron McKie to score all of Philadelphia's 19
points in the final six minutes.
"Yeah, it fired us up. We were kind of (ticked) off," McKie
said. "McGrady takes a blow at his face and we get the stiff,
but we're a confident group. We've been in several games like
this throughout last season. You have to expect games like
this. These are the games you like to win."
Iverson scored 29 points and McKie contributed 14, drilling two
big 3-pointers down the stretch. Theo Ratliff added 14 points
and a career-high 17 rebounds for the Sixers (3-0), who won in
Orlando during the regular season for the first time since April
1, 1997, ending a five-game skid.
"These guys (Sixers) have been waiting for the opportunity to do
some big things out on the basketball court," Iverson said.
"They hear everything you write about us not having a shot
because we don't have the talent. But now, a lot of heads are
starting to turn and people recognize there's other guys that
are capable of doing big-time things in this league."
throw exception c 在 Itanium C++ ABI: Exception Handling ($Revision: 1.22 $) 的推薦與評價
In the case an exception is thrown, the stack is unwound while the exception propagates, but it is expected that the ... ... <看更多>
throw exception c 在 Exception specifications (throw, noexcept) (C++) - cpp-docs 的推薦與評價
Exception specifications (throw, noexcept) (C++) ... Exception specifications are a C++ language feature that indicate the programmer's intent about the exception ... ... <看更多>
throw exception c 在 How can I throw an exception in C? - Stack Overflow 的推薦與評價
... <看更多>
相關內容